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)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("minpeter/tiny-ko-sft") model = AutoModelForCausalLM.from_pretrained("minpeter/tiny-ko-sft") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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
|
@@ -6,6 +6,7 @@ tags:
|
|
| 6 |
- generated_from_trainer
|
| 7 |
datasets:
|
| 8 |
- lemon-mint/Korean-FineTome-100k
|
|
|
|
| 9 |
model-index:
|
| 10 |
- name: ko-tiny-exp
|
| 11 |
results: []
|
|
@@ -30,6 +31,13 @@ datasets:
|
|
| 30 |
message_property_mappings:
|
| 31 |
role: role
|
| 32 |
content: content
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
dataset_prepared_path: last_run_prepared
|
| 34 |
val_set_size: 0.05
|
| 35 |
|
|
@@ -45,7 +53,6 @@ pad_to_sequence_len: true
|
|
| 45 |
gradient_accumulation_steps: 4
|
| 46 |
micro_batch_size: 16
|
| 47 |
|
| 48 |
-
num_epochs: 2
|
| 49 |
optimizer: paged_adamw_8bit
|
| 50 |
lr_scheduler: cosine
|
| 51 |
learning_rate: 2e-5
|
|
@@ -61,6 +68,7 @@ logging_steps: 1
|
|
| 61 |
flash_attention: true
|
| 62 |
|
| 63 |
warmup_steps: 100
|
|
|
|
| 64 |
evals_per_epoch: 2
|
| 65 |
saves_per_epoch: 1
|
| 66 |
weight_decay: 0.0
|
|
@@ -71,9 +79,9 @@ weight_decay: 0.0
|
|
| 71 |
|
| 72 |
# ko-tiny-exp
|
| 73 |
|
| 74 |
-
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
|
| 75 |
It achieves the following results on the evaluation set:
|
| 76 |
-
- Loss: 2.
|
| 77 |
|
| 78 |
## Model description
|
| 79 |
|
|
@@ -101,17 +109,16 @@ The following hyperparameters were used during training:
|
|
| 101 |
- optimizer: Use OptimizerNames.PAGED_ADAMW_8BIT with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 102 |
- lr_scheduler_type: cosine
|
| 103 |
- lr_scheduler_warmup_steps: 100
|
| 104 |
-
- training_steps:
|
| 105 |
|
| 106 |
### Training results
|
| 107 |
|
| 108 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 109 |
|:-------------:|:------:|:----:|:---------------:|
|
| 110 |
-
| 3.
|
| 111 |
-
| 2.
|
| 112 |
-
| 2.
|
| 113 |
-
|
|
| 114 |
-
| 2.9403 | 1.9831 | 176 | 2.9471 |
|
| 115 |
|
| 116 |
|
| 117 |
### Framework versions
|
|
|
|
| 6 |
- generated_from_trainer
|
| 7 |
datasets:
|
| 8 |
- lemon-mint/Korean-FineTome-100k
|
| 9 |
+
- lemon-mint/smol-koreantalk
|
| 10 |
model-index:
|
| 11 |
- name: ko-tiny-exp
|
| 12 |
results: []
|
|
|
|
| 31 |
message_property_mappings:
|
| 32 |
role: role
|
| 33 |
content: content
|
| 34 |
+
- path: lemon-mint/smol-koreantalk
|
| 35 |
+
type: chat_template
|
| 36 |
+
split: train[:20%]
|
| 37 |
+
field_messages: messages
|
| 38 |
+
message_property_mappings:
|
| 39 |
+
role: role
|
| 40 |
+
content: content
|
| 41 |
dataset_prepared_path: last_run_prepared
|
| 42 |
val_set_size: 0.05
|
| 43 |
|
|
|
|
| 53 |
gradient_accumulation_steps: 4
|
| 54 |
micro_batch_size: 16
|
| 55 |
|
|
|
|
| 56 |
optimizer: paged_adamw_8bit
|
| 57 |
lr_scheduler: cosine
|
| 58 |
learning_rate: 2e-5
|
|
|
|
| 68 |
flash_attention: true
|
| 69 |
|
| 70 |
warmup_steps: 100
|
| 71 |
+
num_epochs: 2
|
| 72 |
evals_per_epoch: 2
|
| 73 |
saves_per_epoch: 1
|
| 74 |
weight_decay: 0.0
|
|
|
|
| 79 |
|
| 80 |
# ko-tiny-exp
|
| 81 |
|
| 82 |
+
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 and the lemon-mint/smol-koreantalk datasets.
|
| 83 |
It achieves the following results on the evaluation set:
|
| 84 |
+
- Loss: 2.8226
|
| 85 |
|
| 86 |
## Model description
|
| 87 |
|
|
|
|
| 109 |
- optimizer: Use OptimizerNames.PAGED_ADAMW_8BIT with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 110 |
- lr_scheduler_type: cosine
|
| 111 |
- lr_scheduler_warmup_steps: 100
|
| 112 |
+
- training_steps: 1498
|
| 113 |
|
| 114 |
### Training results
|
| 115 |
|
| 116 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 117 |
|:-------------:|:------:|:----:|:---------------:|
|
| 118 |
+
| 3.0001 | 0.0013 | 1 | 2.9904 |
|
| 119 |
+
| 2.8288 | 0.5002 | 375 | 2.8669 |
|
| 120 |
+
| 2.8188 | 1.0 | 750 | 2.8255 |
|
| 121 |
+
| 2.8012 | 1.5002 | 1125 | 2.8226 |
|
|
|
|
| 122 |
|
| 123 |
|
| 124 |
### Framework versions
|