Instructions to use jclian91/Qwen2-72B-Instruct-math with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jclian91/Qwen2-72B-Instruct-math with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jclian91/Qwen2-72B-Instruct-math") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jclian91/Qwen2-72B-Instruct-math") model = AutoModelForCausalLM.from_pretrained("jclian91/Qwen2-72B-Instruct-math", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jclian91/Qwen2-72B-Instruct-math with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jclian91/Qwen2-72B-Instruct-math" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jclian91/Qwen2-72B-Instruct-math", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jclian91/Qwen2-72B-Instruct-math
- SGLang
How to use jclian91/Qwen2-72B-Instruct-math 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 "jclian91/Qwen2-72B-Instruct-math" \ --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": "jclian91/Qwen2-72B-Instruct-math", "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 "jclian91/Qwen2-72B-Instruct-math" \ --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": "jclian91/Qwen2-72B-Instruct-math", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jclian91/Qwen2-72B-Instruct-math with Docker Model Runner:
docker model run hf.co/jclian91/Qwen2-72B-Instruct-math
Commit History
Update README.md 250bdd4 verified
Update README.md 9ac6e52 verified
Update README.md 485a819 verified
Update README.md acd3fd4 verified
Update README.md f65caec verified
Update README.md 8d9a60c verified
Update README.md f1be7da verified
Update README.md 799c2af verified
Update README.md efef09d verified
Update README.md 1a05d44 verified
add 3*/31 models 5ab92a7
lianmingjie commited on
add 20-29/31 models f8cc25d
lianmingjie commited on
add 10-19/31 models 6ec8088
lianmingjie commited on
add 9/31 models 81d1457
lianmingjie commited on
add 1/31 model file b3c41bf
lianmingjie commited on
new txt file 3677e6c
lianmingjie commited on
new json file 3aac83a
lianmingjie commited on
second commit 8789b67
lianmingjie commited on
first commit 3a0d571
lianmingjie commited on