Magpie-Align/Magpie-Pro-MT-300K-v0.1
Viewer • Updated • 300k • 3.66k • 32
How to use fblgit/miniclaus-qw1.5B-UNAMGS with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="fblgit/miniclaus-qw1.5B-UNAMGS")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("fblgit/miniclaus-qw1.5B-UNAMGS")
model = AutoModelForCausalLM.from_pretrained("fblgit/miniclaus-qw1.5B-UNAMGS")
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 fblgit/miniclaus-qw1.5B-UNAMGS with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "fblgit/miniclaus-qw1.5B-UNAMGS"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "fblgit/miniclaus-qw1.5B-UNAMGS",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/fblgit/miniclaus-qw1.5B-UNAMGS
How to use fblgit/miniclaus-qw1.5B-UNAMGS with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "fblgit/miniclaus-qw1.5B-UNAMGS" \
--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": "fblgit/miniclaus-qw1.5B-UNAMGS",
"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 "fblgit/miniclaus-qw1.5B-UNAMGS" \
--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": "fblgit/miniclaus-qw1.5B-UNAMGS",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use fblgit/miniclaus-qw1.5B-UNAMGS with Docker Model Runner:
docker model run hf.co/fblgit/miniclaus-qw1.5B-UNAMGS
Trained with Magpie-Align/Magpie-Pro-MT-300K-v0.1
Using MGS & UNA (MLP) on this tiny but powerful model.
It achieves the following results on the evaluation set:
Available at:
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.1641 | 0.0007 | 1 | 0.8514 |
| 0.9246 | 0.0503 | 76 | 0.7921 |
| 0.8791 | 0.1006 | 152 | 0.7727 |
| 0.8507 | 0.1509 | 228 | 0.7611 |
| 0.8376 | 0.2012 | 304 | 0.7534 |
| 0.793 | 0.2515 | 380 | 0.7467 |
| 0.7834 | 0.3018 | 456 | 0.7421 |
| 0.7807 | 0.3521 | 532 | 0.7384 |
| 0.764 | 0.4023 | 608 | 0.7359 |
| 0.7738 | 0.4526 | 684 | 0.7320 |
| 0.7425 | 0.5029 | 760 | 0.7300 |
| 0.7519 | 0.5532 | 836 | 0.7279 |
| 0.7461 | 0.6035 | 912 | 0.7255 |
| 0.7489 | 0.6538 | 988 | 0.7245 |
| 0.7614 | 0.7041 | 1064 | 0.7222 |
| 0.7576 | 0.7544 | 1140 | 0.7222 |
| 0.7303 | 0.8047 | 1216 | 0.7209 |
| 0.7332 | 0.8550 | 1292 | 0.7199 |
| 0.7541 | 0.9053 | 1368 | 0.7202 |
| 0.7369 | 0.9556 | 1444 | 0.7193 |
@misc{miniclaus-qw15,
title={MiniClaus: 1.5B UNAMGS},
author={Xavier Murias},
year={2024},
publisher = {HuggingFace},
journal = {HuggingFace repository},
howpublished = {\url{https://huggingface.co/fblgit/miniclaus-qw1.5B-UNAMGS}},
}
@misc{Magpie,
title={Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothing},
author={Zhangchen Xu and Fengqing Jiang and Luyao Niu and Yuntian Deng and Radha Poovendran and Yejin Choi and Bill Yuchen Lin},
year={2024},
eprint={2406.08464},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{qwen2.5,
title = {Qwen2.5: A Party of Foundation Models},
url = {https://qwenlm.github.io/blog/qwen2.5/},
author = {Qwen Team},
month = {September},
year = {2024}
}
@article{qwen2,
title={Qwen2 Technical Report},
author={An Yang and Baosong Yang and Binyuan Hui and Bo Zheng and Bowen Yu and Chang Zhou and Chengpeng Li and Chengyuan Li and Dayiheng Liu and Fei Huang and Guanting Dong and Haoran Wei and Huan Lin and Jialong Tang and Jialin Wang and Jian Yang and Jianhong Tu and Jianwei Zhang and Jianxin Ma and Jin Xu and Jingren Zhou and Jinze Bai and Jinzheng He and Junyang Lin and Kai Dang and Keming Lu and Keqin Chen and Kexin Yang and Mei Li and Mingfeng Xue and Na Ni and Pei Zhang and Peng Wang and Ru Peng and Rui Men and Ruize Gao and Runji Lin and Shijie Wang and Shuai Bai and Sinan Tan and Tianhang Zhu and Tianhao Li and Tianyu Liu and Wenbin Ge and Xiaodong Deng and Xiaohuan Zhou and Xingzhang Ren and Xinyu Zhang and Xipin Wei and Xuancheng Ren and Yang Fan and Yang Yao and Yichang Zhang and Yu Wan and Yunfei Chu and Yuqiong Liu and Zeyu Cui and Zhenru Zhang and Zhihao Fan},
journal={arXiv preprint arXiv:2407.10671},
year={2024}
}
Base model
Qwen/Qwen2.5-1.5B