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
Training in progress, step 112
Browse files- config.json +2 -2
- model.safetensors +1 -1
- special_tokens_map.json +1 -1
- tokenizer_config.json +1 -1
- training_args.bin +1 -1
config.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
],
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
-
"bos_token_id":
|
| 8 |
"eos_token_id": 128001,
|
| 9 |
"head_dim": 64,
|
| 10 |
"hidden_act": "silu",
|
|
@@ -12,7 +12,7 @@
|
|
| 12 |
"initializer_range": 0.041666666666666664,
|
| 13 |
"intermediate_size": 1536,
|
| 14 |
"is_llama_config": true,
|
| 15 |
-
"max_position_embeddings":
|
| 16 |
"mlp_bias": false,
|
| 17 |
"model_type": "llama",
|
| 18 |
"num_attention_heads": 9,
|
|
|
|
| 4 |
],
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 128002,
|
| 8 |
"eos_token_id": 128001,
|
| 9 |
"head_dim": 64,
|
| 10 |
"hidden_act": "silu",
|
|
|
|
| 12 |
"initializer_range": 0.041666666666666664,
|
| 13 |
"intermediate_size": 1536,
|
| 14 |
"is_llama_config": true,
|
| 15 |
+
"max_position_embeddings": 512,
|
| 16 |
"mlp_bias": false,
|
| 17 |
"model_type": "llama",
|
| 18 |
"num_attention_heads": 9,
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 360189624
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3dc6958f2b5435709e4011b6fa61af00ef9217f7203fc7c236af528d4baed6ef
|
| 3 |
size 360189624
|
special_tokens_map.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"bos_token": {
|
| 3 |
-
"content": "<|
|
| 4 |
"lstrip": false,
|
| 5 |
"normalized": false,
|
| 6 |
"rstrip": false,
|
|
|
|
| 1 |
{
|
| 2 |
"bos_token": {
|
| 3 |
+
"content": "<|im_start|>",
|
| 4 |
"lstrip": false,
|
| 5 |
"normalized": false,
|
| 6 |
"rstrip": false,
|
tokenizer_config.json
CHANGED
|
@@ -2057,7 +2057,7 @@
|
|
| 2057 |
"special": true
|
| 2058 |
}
|
| 2059 |
},
|
| 2060 |
-
"bos_token": "<|
|
| 2061 |
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
| 2062 |
"clean_up_tokenization_spaces": false,
|
| 2063 |
"eos_token": "<|im_end|>",
|
|
|
|
| 2057 |
"special": true
|
| 2058 |
}
|
| 2059 |
},
|
| 2060 |
+
"bos_token": "<|im_start|>",
|
| 2061 |
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
| 2062 |
"clean_up_tokenization_spaces": false,
|
| 2063 |
"eos_token": "<|im_end|>",
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6904
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b524355529cb5c6ced08bdc825cfef9ef61f1a85fe77a2fe62399a5c592d1636
|
| 3 |
size 6904
|