Instructions to use yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B") model = PeftModel.from_pretrained(base_model, "yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B") - Transformers
How to use yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B
- SGLang
How to use yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B 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 "yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B" \ --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": "yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B", "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 "yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B" \ --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": "yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B with Docker Model Runner:
docker model run hf.co/yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B
Download scheduler.pt from yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B: direct link, hf CLI and curl.
- Browser
- Download file 1.47 kB
-
https://huggingface.co/yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B/resolve/main/scheduler.pt
- Command line
-
hf download hf://yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B/scheduler.pt
-
curl -L -o scheduler.pt https://huggingface.co/yihongLiu/COPSD-PolyMath-SWA-Qwen3-4B/resolve/main/scheduler.pt
1.47 kB
- Xet hash:
- 9f7063f9adb0920265f64644c01029d0398eb77ab23cbc168ef359883f1537a3
- Size of remote file:
- 1.47 kB
- SHA256:
- 988932cb6120bb6996756fe043cc511b975113d2e6456af01ffd7d4bd36fd036
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.