Text Generation
Transformers
PyTorch
Safetensors
English
qwen2
text-generation-inference
unsloth
trl
conversational
Eval Results (legacy)
Instructions to use qingy2024/Qwen2.5-Math-14B-Instruct-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use qingy2024/Qwen2.5-Math-14B-Instruct-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="qingy2024/Qwen2.5-Math-14B-Instruct-Preview") 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("qingy2024/Qwen2.5-Math-14B-Instruct-Preview") model = AutoModelForCausalLM.from_pretrained("qingy2024/Qwen2.5-Math-14B-Instruct-Preview", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use qingy2024/Qwen2.5-Math-14B-Instruct-Preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "qingy2024/Qwen2.5-Math-14B-Instruct-Preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "qingy2024/Qwen2.5-Math-14B-Instruct-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/qingy2024/Qwen2.5-Math-14B-Instruct-Preview
- SGLang
How to use qingy2024/Qwen2.5-Math-14B-Instruct-Preview 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 "qingy2024/Qwen2.5-Math-14B-Instruct-Preview" \ --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": "qingy2024/Qwen2.5-Math-14B-Instruct-Preview", "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 "qingy2024/Qwen2.5-Math-14B-Instruct-Preview" \ --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": "qingy2024/Qwen2.5-Math-14B-Instruct-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use qingy2024/Qwen2.5-Math-14B-Instruct-Preview with Docker Model Runner:
docker model run hf.co/qingy2024/Qwen2.5-Math-14B-Instruct-Preview
Commit History
-
Adding `safetensors` variant of this model (#2)
- Adding `safetensors` variant of this model (d33994b498a90273db1f11907ac834a766dc34c8) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>f2a05ba
-
Update README.md
Qingyun Li1dae394 -
Adding Evaluation Results (#1)
Qingyun Li +1: leaderboard-pr-bot - Adding Evaluation Results (1aa94f7bb71f476342c1bf4a8525bcadd5ffa166) Co-authored-by: Open LLM Leaderboard PR Bot <leaderboard-pr-bot@users.noreply.huggingface.co>afd3a90
-
(Trained with Unsloth)
Qingyun Li7fc1493 -
Upload README.md with huggingface_hub
Qingyun Li6ad5011 -
initial commit
Qingyun Lic0b214a