Run this model with HF Jobs
Run unicorn-team/Unicorn-R3 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/unicorn-team/Unicorn-R3. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/unicorn-team/Unicorn-R3 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/unicorn-team/Unicorn-R3. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/unicorn-team/Unicorn-R3. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use unicorn-team/Unicorn-R3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unicorn-team/Unicorn-R3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unicorn-team/Unicorn-R3") 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("unicorn-team/Unicorn-R3") model = AutoModelForCausalLM.from_pretrained("unicorn-team/Unicorn-R3", 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 unicorn-team/Unicorn-R3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unicorn-team/Unicorn-R3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unicorn-team/Unicorn-R3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unicorn-team/Unicorn-R3
- SGLang
How to use unicorn-team/Unicorn-R3 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 "unicorn-team/Unicorn-R3" \ --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": "unicorn-team/Unicorn-R3", "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 "unicorn-team/Unicorn-R3" \ --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": "unicorn-team/Unicorn-R3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use unicorn-team/Unicorn-R3 with Docker Model Runner:
docker model run hf.co/unicorn-team/Unicorn-R3
Create README.md
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190---library_name: transformersbase_model:- Qwen/Qwen3-8B---
<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. -->
[<img src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/axolotl-ai-cloud/axolotl)<details><summary>See axolotl config</summary>
axolotl version: `0.13.0.dev0````yamlbase_model: /mnt/qwen3-8b
load_in_8bit: falseload_in_4bit: falsestrict: false
plugins: - axolotl.integrations.liger.LigerPlugin
liger_rope: trueliger_rms_norm: trueliger_glu_activation: trueliger_layer_norm: trueliger_fused_linear_cross_entropy: true
chat_template: qwen3datasets: # Dolci - path: /home/aithucchien/Unicorn/data/dolci_vi_5k_single.jsonl type: chat_template chat_template: qwen3 split_thinking: true
# 12 Task - path: /home/aithucchien/luannd/Unicorn/data/synthetic/output_12_task_split/task2_sua_loi_sai_answer.jsonl type: chat_template chat_template: qwen3 split_thinking: true - path: /home/aithucchien/luannd/Unicorn/data/synthetic/output_12_task_split/task3_goi_mo_y_tuong_answer.jsonl type: chat_template chat_template: qwen3 split_thinking: true - path: /home/aithucchien/luannd/Unicorn/data/synthetic/output_12_task_split/task10_hoc_tap_tuong_tac_answer.jsonl type: chat_template chat_template: qwen3 split_thinking: true - path: /home/aithucchien/luannd/Unicorn/data/synthetic/output_12_task_split/task1_tra_loi_cau_hoi_extended_2.jsonl type: chat_template chat_template: qwen3 split_thinking: true - path: /home/aithucchien/luannd/Unicorn/data/synthetic/output_12_task_split/task8_tao_tai_lieu_giang_day_answer.jsonl type: chat_template chat_template: qwen3 split_thinking: true - path: /home/aithucchien/luannd/Unicorn/data/synthetic/output_12_task_split/task9_tao_noi_dung_ca_nhan_hoa_answer.jsonl type: chat_template chat_template: qwen3 split_thinking: true - path: /home/aithucchien/luannd/Unicorn/data/synthetic/output_12_task_split/task5_ho_tro_tam_ly_answer.jsonl type: chat_template chat_template: qwen3 split_thinking: true - path: /home/aithucchien/luannd/Unicorn/data/synthetic/output_12_task_split/task7_cham_diem_tu_dong_answer.jsonl type: chat_template chat_template: qwen3 split_thinking: true - path: /home/aithucchien/luannd/Unicorn/data/synthetic/output_12_task_split/task6_tao_bo_cau_hoi_answer.jsonl type: chat_template chat_template: qwen3 split_thinking: true - path: /home/aithucchien/luannd/Unicorn/data/synthetic/output_12_task_split/task1_tra_loi_cau_hoi_extended.jsonl type: chat_template chat_template: qwen3 split_thinking: true - path: /home/aithucchien/luannd/Unicorn/data/synthetic/output_12_task_split/task4_hoc_tap_ca_nhan_hoa_answer.jsonl type: chat_template chat_template: qwen3 split_thinking: true - path: /home/aithucchien/luannd/Unicorn/data/synthetic/output_12_task_split/task1_tra_loi_cau_hoi_answer.jsonl type: chat_template chat_template: qwen3 split_thinking: true - path: /home/aithucchien/luannd/Unicorn/data/synthetic/output_12_task_split/task11_tu_van_an_toan_answer.jsonl type: chat_template chat_template: qwen3 split_thinking: true
output_dir: ./outputs/qwen3_8b_dolci_vi_5k_single_12task/
sequence_len: 32768sample_packing: trueflex_attention: true
flex_attn_compile_kwargs: dynamic: false mode: max-autotune-no-cudagraphs
wandb_project: aithucchienwandb_entity:wandb_watch:wandb_name: qwen3_8b_dolci_vi_5k_single_12taskwandb_log_model:
gradient_accumulation_steps: 4micro_batch_size: 1num_epochs: 3optimizer: adamw_torch_fusedlr_scheduler: cosinelearning_rate: 2e-5
bf16: truetf32: true
resume_from_checkpoint:logging_steps: 1
saves_per_epoch: 1
warmup_ratio: 0.1weight_decay: 0.0fsdp: - full_shard - auto_wrap
fsdp_config: fsdp_version: 2 fsdp_offload_params: false fsdp_cpu_ram_efficient_loading: true fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP fsdp_transformer_layer_cls_to_wrap: Qwen3DecoderLayer fsdp_state_dict_type: FULL_STATE_DICT fsdp_sharding_strategy: FULL_SHARD fsdp_reshard_after_forward: true fsdp_activation_checkpointing: true
special_tokens:
```
</details><br>
# Unicorn-R3
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:- learning_rate: 2e-05- train_batch_size: 1- eval_batch_size: 1- seed: 42- distributed_type: multi-GPU- num_devices: 2- gradient_accumulation_steps: 4- total_train_batch_size: 8- total_eval_batch_size: 2- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments- lr_scheduler_type: cosine- lr_scheduler_warmup_steps: 18- training_steps: 186
### Training results
### Framework versions
- Transformers 4.57.3- Pytorch 2.8.0+cu128- Datasets 4.4.1- Tokenizers 0.22.1README.mdAdded+190