Instructions to use benhaotang/phi4-qwq-sky-t1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use benhaotang/phi4-qwq-sky-t1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="benhaotang/phi4-qwq-sky-t1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("benhaotang/phi4-qwq-sky-t1") model = AutoModelForCausalLM.from_pretrained("benhaotang/phi4-qwq-sky-t1") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use benhaotang/phi4-qwq-sky-t1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "benhaotang/phi4-qwq-sky-t1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "benhaotang/phi4-qwq-sky-t1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/benhaotang/phi4-qwq-sky-t1
- SGLang
How to use benhaotang/phi4-qwq-sky-t1 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 "benhaotang/phi4-qwq-sky-t1" \ --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": "benhaotang/phi4-qwq-sky-t1", "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 "benhaotang/phi4-qwq-sky-t1" \ --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": "benhaotang/phi4-qwq-sky-t1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use benhaotang/phi4-qwq-sky-t1 with Docker Model Runner:
docker model run hf.co/benhaotang/phi4-qwq-sky-t1
merge
This is a merge of pre-trained language models created using mergekit.
Merge Details
Merge Method
This model was merged using the TIES merge method using prithivMLmods/Phi-4-QwQ as a base.
Models Merged
The following models were included in the merge:
- benhaotang/Phi-4-llama-t1-full but actually win10/Phi-4-llama-t1-lora, this is who and where you should really thank.
- prithivMLmods/Phi-4-QwQ
Eval
IFEval is broken due to the Sky-T1 strict system prompt format, but other than that, seems to have recreated qwq at 14B.
Running
- With Ollama
ollama run hf.co/benhaotang/phi4-qwq-sky-t1-Q4_K_M-GGUF
I suggest adding SYSTEM "You are a helpful AI asistent. You always think step by step." to triger step by step reasoning.
- With pytorch
import transformers
tokenizer = AutoTokenizer.from_pretrained("mircosoft/phi-4")
pipeline = transformers.pipeline(
"text-generation",
model="benhaotang/phi4-qwq-sky-t1",
tokenizer=tokenizer,
device_map="auto",
)
messages = [
{"role": "system", "content": "You are a helpful AI asistent. You always think step by step."},
{"role": "user", "content": "Give me a short intodcution to renormalization group(RG) flow in physcis?"},
]
outputs = pipeline(messages, max_new_tokens=128)
print(outputs[0]["generated_text"])
Configuration
The following YAML configuration was used to produce this model:
models:
- model: prithivMLmods/Phi-4-QwQ
#no parameters necessary for base model
- model: benhaotang/Phi-4-llama-t1-full
parameters:
density: 0.5
weight: 0.5
- model: prithivMLmods/Phi-4-QwQ
parameters:
density: 0.5
weight: 0.5
merge_method: ties
base_model: prithivMLmods/Phi-4-QwQ
parameters:
normalize: false
int8_mask: true
dtype: float16
Open LLM Leaderboard Evaluation Results
Detailed results can be found here! Summarized results can be found here!
| Metric | Value (%) |
|---|---|
| Average | 30.78 |
| IFEval (0-Shot) | 4.60 |
| BBH (3-Shot) | 52.61 |
| MATH Lvl 5 (4-Shot) | 39.58 |
| GPQA (0-shot) | 19.35 |
| MuSR (0-shot) | 21.38 |
| MMLU-PRO (5-shot) | 47.16 |
- Downloads last month
- 9
Model tree for benhaotang/phi4-qwq-sky-t1
Dataset used to train benhaotang/phi4-qwq-sky-t1
Space using benhaotang/phi4-qwq-sky-t1 1
Paper for benhaotang/phi4-qwq-sky-t1
Evaluation results
- averaged accuracy on IFEval (0-Shot)Open LLM Leaderboard4.600
- normalized accuracy on BBH (3-Shot)test set Open LLM Leaderboard52.610
- exact match on MATH Lvl 5 (4-Shot)test set Open LLM Leaderboard39.580
- acc_norm on GPQA (0-shot)Open LLM Leaderboard19.350
- acc_norm on MuSR (0-shot)Open LLM Leaderboard21.380
- accuracy on MMLU-PRO (5-shot)test set Open LLM Leaderboard47.160
