Text Generation
Transformers
Safetensors
qwen2_moe
Generated from Trainer
open-r1
trl
sft
conversational
Instructions to use xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router") model = AutoModelForCausalLM.from_pretrained("xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router", 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 xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router
- SGLang
How to use xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router 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 "xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router" \ --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": "xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router", "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 "xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router" \ --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": "xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router with Docker Model Runner:
docker model run hf.co/xd2010/Qwen1.5-MOE-sft-math7k-sft-2epochs-frozen-router
Training in progress, epoch 2
Browse files
model-00001-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4996577736
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1b6905e6b62b000a803e925502f0bde7d441908436171c24fd79eb09f7d793f
|
| 3 |
size 4996577736
|
model-00002-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4996347752
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4a506b09725ec40516c4aff5544d51fe86615e7e83ab2a9b9829492b2383dafa
|
| 3 |
size 4996347752
|
model-00003-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4997127120
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1de0b5f33d9bd2d2d4438fef38499eca5e4b58b457d9c8707e940b08fc119eaa
|
| 3 |
size 4997127120
|
model-00004-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4985592520
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c80ab71501bef7a995c378b65a5bbf7e33e3247dd80c3790a73ab0fdafe2e3f
|
| 3 |
size 4985592520
|
model-00005-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4996348976
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:04dba6711d1ea44f66433e1521bf685ab4fda78424ba978c1e51488a6c892292
|
| 3 |
size 4996348976
|
model-00006-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3660151400
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2ef532ad92381caddea414785b69d9707582103936c3e0c4daae5a984a694cb7
|
| 3 |
size 3660151400
|
tokenizer.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 11418364
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:330cb08481ae4defb33ae8a1cdd29d050497fe5bf4158dbb43545c3954ffa887
|
| 3 |
size 11418364
|