Text Generation
Transformers
Safetensors
llama
axolotl
Generated from Trainer
conversational
text-generation-inference
Instructions to use minpeter/tiny-ko-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use minpeter/tiny-ko-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="minpeter/tiny-ko-sft") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("minpeter/tiny-ko-sft") model = AutoModelForCausalLM.from_pretrained("minpeter/tiny-ko-sft", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use minpeter/tiny-ko-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "minpeter/tiny-ko-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minpeter/tiny-ko-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/minpeter/tiny-ko-sft
- SGLang
How to use minpeter/tiny-ko-sft 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 "minpeter/tiny-ko-sft" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minpeter/tiny-ko-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "minpeter/tiny-ko-sft" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minpeter/tiny-ko-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use minpeter/tiny-ko-sft with Docker Model Runner:
docker model run hf.co/minpeter/tiny-ko-sft
End of training
Browse files
README.md
CHANGED
|
@@ -111,21 +111,21 @@ save_steps: 200
|
|
| 111 |
warmup_steps: 20
|
| 112 |
eval_steps: 200
|
| 113 |
|
| 114 |
-
sequence_len:
|
| 115 |
|
| 116 |
-
#
|
| 117 |
sample_packing: false
|
| 118 |
-
# true for exp
|
| 119 |
train_on_inputs: true
|
|
|
|
| 120 |
|
| 121 |
pad_to_sequence_len: true
|
| 122 |
|
| 123 |
gradient_accumulation_steps: 4
|
| 124 |
-
micro_batch_size:
|
| 125 |
|
| 126 |
optimizer: paged_adamw_8bit
|
| 127 |
lr_scheduler: cosine
|
| 128 |
-
learning_rate:
|
| 129 |
|
| 130 |
bf16: auto
|
| 131 |
tf32: false
|
|
@@ -157,7 +157,7 @@ weight_decay: 0.0
|
|
| 157 |
|
| 158 |
This model is a fine-tuned version of [minpeter/pretrained-tiny-ko](https://huggingface.co/minpeter/pretrained-tiny-ko) on the lemon-mint/Korean-FineTome-100k, the lemon-mint/smol-koreantalk, the heegyu/open-korean-instructions-v20231020, the FreedomIntelligence/evol-instruct-korean, the FreedomIntelligence/alpaca-gpt4-korean, the FreedomIntelligence/sharegpt-korean, the coastral/korean-writing-style-instruct and the devngho/korean-instruction-mix datasets.
|
| 159 |
It achieves the following results on the evaluation set:
|
| 160 |
-
- Loss:
|
| 161 |
|
| 162 |
## Model description
|
| 163 |
|
|
@@ -176,31 +176,44 @@ More information needed
|
|
| 176 |
### Training hyperparameters
|
| 177 |
|
| 178 |
The following hyperparameters were used during training:
|
| 179 |
-
- learning_rate:
|
| 180 |
-
- train_batch_size:
|
| 181 |
-
- eval_batch_size:
|
| 182 |
- seed: 42
|
| 183 |
- distributed_type: multi-GPU
|
| 184 |
- num_devices: 2
|
| 185 |
- gradient_accumulation_steps: 4
|
| 186 |
-
- total_train_batch_size:
|
| 187 |
-
- total_eval_batch_size:
|
| 188 |
- optimizer: Use OptimizerNames.PAGED_ADAMW_8BIT with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 189 |
- lr_scheduler_type: cosine
|
| 190 |
- lr_scheduler_warmup_steps: 20
|
| 191 |
-
- training_steps:
|
| 192 |
|
| 193 |
### Training results
|
| 194 |
|
| 195 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 196 |
|:-------------:|:------:|:----:|:---------------:|
|
| 197 |
-
|
|
| 198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
|
| 200 |
|
| 201 |
### Framework versions
|
| 202 |
|
| 203 |
-
- Transformers 4.
|
| 204 |
- Pytorch 2.6.0+cu124
|
| 205 |
-
- Datasets 3.
|
| 206 |
- Tokenizers 0.21.1
|
|
|
|
| 111 |
warmup_steps: 20
|
| 112 |
eval_steps: 200
|
| 113 |
|
| 114 |
+
sequence_len: 2048
|
| 115 |
|
| 116 |
+
# <<<< experimental settings <<<<
|
| 117 |
sample_packing: false
|
|
|
|
| 118 |
train_on_inputs: true
|
| 119 |
+
# >>>> experimental settings >>>
|
| 120 |
|
| 121 |
pad_to_sequence_len: true
|
| 122 |
|
| 123 |
gradient_accumulation_steps: 4
|
| 124 |
+
micro_batch_size: 16
|
| 125 |
|
| 126 |
optimizer: paged_adamw_8bit
|
| 127 |
lr_scheduler: cosine
|
| 128 |
+
learning_rate: 1e-3
|
| 129 |
|
| 130 |
bf16: auto
|
| 131 |
tf32: false
|
|
|
|
| 157 |
|
| 158 |
This model is a fine-tuned version of [minpeter/pretrained-tiny-ko](https://huggingface.co/minpeter/pretrained-tiny-ko) on the lemon-mint/Korean-FineTome-100k, the lemon-mint/smol-koreantalk, the heegyu/open-korean-instructions-v20231020, the FreedomIntelligence/evol-instruct-korean, the FreedomIntelligence/alpaca-gpt4-korean, the FreedomIntelligence/sharegpt-korean, the coastral/korean-writing-style-instruct and the devngho/korean-instruction-mix datasets.
|
| 159 |
It achieves the following results on the evaluation set:
|
| 160 |
+
- Loss: 1.5699
|
| 161 |
|
| 162 |
## Model description
|
| 163 |
|
|
|
|
| 176 |
### Training hyperparameters
|
| 177 |
|
| 178 |
The following hyperparameters were used during training:
|
| 179 |
+
- learning_rate: 0.001
|
| 180 |
+
- train_batch_size: 16
|
| 181 |
+
- eval_batch_size: 16
|
| 182 |
- seed: 42
|
| 183 |
- distributed_type: multi-GPU
|
| 184 |
- num_devices: 2
|
| 185 |
- gradient_accumulation_steps: 4
|
| 186 |
+
- total_train_batch_size: 128
|
| 187 |
+
- total_eval_batch_size: 32
|
| 188 |
- optimizer: Use OptimizerNames.PAGED_ADAMW_8BIT with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 189 |
- lr_scheduler_type: cosine
|
| 190 |
- lr_scheduler_warmup_steps: 20
|
| 191 |
+
- training_steps: 2972
|
| 192 |
|
| 193 |
### Training results
|
| 194 |
|
| 195 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 196 |
|:-------------:|:------:|:----:|:---------------:|
|
| 197 |
+
| 2.8061 | 0.0010 | 1 | 2.8887 |
|
| 198 |
+
| 1.9625 | 0.2019 | 200 | 1.9494 |
|
| 199 |
+
| 1.8455 | 0.4037 | 400 | 1.8601 |
|
| 200 |
+
| 1.7395 | 0.6056 | 600 | 1.8045 |
|
| 201 |
+
| 1.7769 | 0.8075 | 800 | 1.7490 |
|
| 202 |
+
| 1.5135 | 1.0091 | 1000 | 1.7116 |
|
| 203 |
+
| 1.5928 | 1.2110 | 1200 | 1.6860 |
|
| 204 |
+
| 1.5322 | 1.4128 | 1400 | 1.6517 |
|
| 205 |
+
| 1.4939 | 1.6147 | 1600 | 1.6218 |
|
| 206 |
+
| 1.4406 | 1.8166 | 1800 | 1.5939 |
|
| 207 |
+
| 1.3999 | 2.0182 | 2000 | 1.5841 |
|
| 208 |
+
| 1.3449 | 2.2200 | 2200 | 1.5770 |
|
| 209 |
+
| 1.2352 | 2.4219 | 2400 | 1.5723 |
|
| 210 |
+
| 1.3043 | 2.6238 | 2600 | 1.5702 |
|
| 211 |
+
| 1.3467 | 2.8256 | 2800 | 1.5699 |
|
| 212 |
|
| 213 |
|
| 214 |
### Framework versions
|
| 215 |
|
| 216 |
+
- Transformers 4.52.3
|
| 217 |
- Pytorch 2.6.0+cu124
|
| 218 |
+
- Datasets 3.6.0
|
| 219 |
- Tokenizers 0.21.1
|