Instructions to use kyujinpy/Kosy-Platypus2-13B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kyujinpy/Kosy-Platypus2-13B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kyujinpy/Kosy-Platypus2-13B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kyujinpy/Kosy-Platypus2-13B") model = AutoModelForCausalLM.from_pretrained("kyujinpy/Kosy-Platypus2-13B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kyujinpy/Kosy-Platypus2-13B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kyujinpy/Kosy-Platypus2-13B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kyujinpy/Kosy-Platypus2-13B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kyujinpy/Kosy-Platypus2-13B
- SGLang
How to use kyujinpy/Kosy-Platypus2-13B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "kyujinpy/Kosy-Platypus2-13B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kyujinpy/Kosy-Platypus2-13B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "kyujinpy/Kosy-Platypus2-13B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kyujinpy/Kosy-Platypus2-13B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kyujinpy/Kosy-Platypus2-13B with Docker Model Runner:
docker model run hf.co/kyujinpy/Kosy-Platypus2-13B
Kosyπ΅llama
Model Details
Model Developers Kyujin Han (kyujinpy)
Model Description
NEFTune methodλ₯Ό νμ©νμ¬ νλ ¨ν Ko-platypus2 new version!
(Noisy + KO + llama = Kosyπ΅llama)
Repo Link
Github KoNEFTune: Kosyπ΅llama
If you visit our github, you can easily apply Random_noisy_embedding_fine-tuning!!
Base Model
hyunseoki/ko-en-llama2-13b
Training Dataset
Version of combined dataset: kyujinpy/KOpen-platypus
I use A100 GPU 40GB and COLAB, when trianing.
Model comparisons
NEFT comparisons
| Model | Average | Ko-ARC | Ko-HellaSwag | Ko-MMLU | Ko-TruthfulQA | Ko-CommonGen V2 |
|---|---|---|---|---|---|---|
| Ko-Platypus2-13B | 45.60 | 44.20 | 54.31 | 42.47 | 44.41 | 42.62 |
| *NEFT(π΅kosy)+MLP-v1 | 43.64 | 43.94 | 53.88 | 42.68 | 43.46 | 34.24 |
| *NEFT(π΅kosy)+MLP-v2 | 45.45 | 44.20 | 54.56 | 42.60 | 42.68 | 42.98 |
| *NEFT(π΅kosy)+MLP-v3 | 46.31 | 43.34 | 54.54 | 43.38 | 44.11 | 46.16 |
| NEFT(π΅kosy)+Attention | 44.92 | 42.92 | 54.48 | 42.99 | 43.00 | 41.20 |
| NEFT(π΅kosy) | 45.08 | 43.09 | 53.61 | 41.06 | 43.47 | 43.21 |
*Different Hyperparameters such that learning_rate, batch_size, epoch, etc...
Implementation Code
### KO-Platypus
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
repo = "kyujinpy/Koisy-Platypus2-13B"
OpenOrca = AutoModelForCausalLM.from_pretrained(
repo,
return_dict=True,
torch_dtype=torch.float16,
device_map='auto'
)
OpenOrca_tokenizer = AutoTokenizer.from_pretrained(repo)
- Downloads last month
- 46
Model tree for kyujinpy/Kosy-Platypus2-13B
Dataset used to train kyujinpy/Kosy-Platypus2-13B
Viewer β’ Updated β’ 24.9k β’ 235 β’ 35
