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
|
@@ -50,12 +50,12 @@ save_steps: 200
|
|
| 50 |
warmup_steps: 100
|
| 51 |
eval_steps: 200
|
| 52 |
|
| 53 |
-
sequence_len:
|
| 54 |
sample_packing: true
|
| 55 |
pad_to_sequence_len: true
|
| 56 |
|
| 57 |
gradient_accumulation_steps: 4
|
| 58 |
-
micro_batch_size:
|
| 59 |
|
| 60 |
optimizer: paged_adamw_8bit
|
| 61 |
lr_scheduler: cosine
|
|
@@ -91,7 +91,7 @@ weight_decay: 0.0
|
|
| 91 |
|
| 92 |
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.
|
| 93 |
It achieves the following results on the evaluation set:
|
| 94 |
-
- Loss: 3.
|
| 95 |
|
| 96 |
## Model description
|
| 97 |
|
|
@@ -111,24 +111,24 @@ More information needed
|
|
| 111 |
|
| 112 |
The following hyperparameters were used during training:
|
| 113 |
- learning_rate: 2e-05
|
| 114 |
-
- train_batch_size:
|
| 115 |
-
- eval_batch_size:
|
| 116 |
- seed: 42
|
| 117 |
- distributed_type: multi-GPU
|
| 118 |
- num_devices: 4
|
| 119 |
- gradient_accumulation_steps: 4
|
| 120 |
-
- total_train_batch_size:
|
| 121 |
-
- total_eval_batch_size:
|
| 122 |
- optimizer: Use OptimizerNames.PAGED_ADAMW_8BIT with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 123 |
- lr_scheduler_type: cosine
|
| 124 |
- lr_scheduler_warmup_steps: 100
|
| 125 |
-
- training_steps:
|
| 126 |
|
| 127 |
### Training results
|
| 128 |
|
| 129 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 130 |
|:-------------:|:------:|:----:|:---------------:|
|
| 131 |
-
| 3.
|
| 132 |
|
| 133 |
|
| 134 |
### Framework versions
|
|
|
|
| 50 |
warmup_steps: 100
|
| 51 |
eval_steps: 200
|
| 52 |
|
| 53 |
+
sequence_len: 1024
|
| 54 |
sample_packing: true
|
| 55 |
pad_to_sequence_len: true
|
| 56 |
|
| 57 |
gradient_accumulation_steps: 4
|
| 58 |
+
micro_batch_size: 32
|
| 59 |
|
| 60 |
optimizer: paged_adamw_8bit
|
| 61 |
lr_scheduler: cosine
|
|
|
|
| 91 |
|
| 92 |
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.
|
| 93 |
It achieves the following results on the evaluation set:
|
| 94 |
+
- Loss: 3.6038
|
| 95 |
|
| 96 |
## Model description
|
| 97 |
|
|
|
|
| 111 |
|
| 112 |
The following hyperparameters were used during training:
|
| 113 |
- learning_rate: 2e-05
|
| 114 |
+
- train_batch_size: 32
|
| 115 |
+
- eval_batch_size: 32
|
| 116 |
- seed: 42
|
| 117 |
- distributed_type: multi-GPU
|
| 118 |
- num_devices: 4
|
| 119 |
- gradient_accumulation_steps: 4
|
| 120 |
+
- total_train_batch_size: 512
|
| 121 |
+
- total_eval_batch_size: 128
|
| 122 |
- optimizer: Use OptimizerNames.PAGED_ADAMW_8BIT with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 123 |
- lr_scheduler_type: cosine
|
| 124 |
- lr_scheduler_warmup_steps: 100
|
| 125 |
+
- training_steps: 102
|
| 126 |
|
| 127 |
### Training results
|
| 128 |
|
| 129 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 130 |
|:-------------:|:------:|:----:|:---------------:|
|
| 131 |
+
| 3.5674 | 0.0193 | 1 | 3.6038 |
|
| 132 |
|
| 133 |
|
| 134 |
### Framework versions
|