HuggingFaceH4/ultrachat_200k
Viewer • Updated • 515k • 91.4k • 875
How to use ondevicellm/qwen_1_8B_llamafied with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="ondevicellm/qwen_1_8B_llamafied")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("ondevicellm/qwen_1_8B_llamafied")
model = AutoModelForCausalLM.from_pretrained("ondevicellm/qwen_1_8B_llamafied", 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=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use ondevicellm/qwen_1_8B_llamafied with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ondevicellm/qwen_1_8B_llamafied"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "ondevicellm/qwen_1_8B_llamafied",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/ondevicellm/qwen_1_8B_llamafied
How to use ondevicellm/qwen_1_8B_llamafied with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "ondevicellm/qwen_1_8B_llamafied" \
--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": "ondevicellm/qwen_1_8B_llamafied",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "ondevicellm/qwen_1_8B_llamafied" \
--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": "ondevicellm/qwen_1_8B_llamafied",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use ondevicellm/qwen_1_8B_llamafied with Docker Model Runner:
docker model run hf.co/ondevicellm/qwen_1_8B_llamafied
This model is a fine-tuned version of KnutJaegersberg/Qwen-1_8B-Llamafied on the HuggingFaceH4/ultrachat_200k dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.3881 | 0.1 | 100 | 1.3937 |
| 1.3499 | 0.2 | 200 | 1.3372 |
| 1.3138 | 0.3 | 300 | 1.3168 |
| 1.3152 | 0.4 | 400 | 1.3045 |
| 1.2897 | 0.5 | 500 | 1.2954 |
| 1.28 | 0.6 | 600 | 1.2882 |
| 1.2669 | 0.7 | 700 | 1.2820 |
| 1.2591 | 0.8 | 800 | 1.2768 |
| 1.2447 | 0.9 | 900 | 1.2721 |
| 1.2867 | 1.0 | 1000 | 1.2680 |
| 1.1918 | 1.1 | 1100 | 1.2684 |
| 1.2002 | 1.2 | 1200 | 1.2660 |
| 1.1943 | 1.3 | 1300 | 1.2633 |
| 1.199 | 1.4 | 1400 | 1.2607 |
| 1.1887 | 1.5 | 1500 | 1.2581 |
| 1.1987 | 1.6 | 1600 | 1.2556 |
| 1.1954 | 1.7 | 1700 | 1.2534 |
| 1.1869 | 1.8 | 1800 | 1.2511 |
| 1.1744 | 1.9 | 1900 | 1.2492 |
| 1.1718 | 2.0 | 2000 | 1.2486 |
| 1.1456 | 2.1 | 2100 | 1.2532 |
| 1.1204 | 2.2 | 2200 | 1.2529 |
| 1.1347 | 2.3 | 2300 | 1.2519 |
| 1.1312 | 2.4 | 2400 | 1.2513 |
| 1.1229 | 2.5 | 2500 | 1.2508 |
| 1.1287 | 2.6 | 2600 | 1.2500 |
| 1.1252 | 2.7 | 2700 | 1.2500 |
| 1.139 | 2.8 | 2800 | 1.2498 |
| 1.1282 | 2.9 | 2900 | 1.2497 |
Base model
KnutJaegersberg/Qwen-1_8B-Llamafied