Text Generation
Transformers
PyTorch
English
Chinese
xmodel
reasoning
small-language-model
efficient-training
xiaoduo-ai
conversational
custom_code
Instructions to use XiaoduoAILab/Xmodel-2.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XiaoduoAILab/Xmodel-2.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="XiaoduoAILab/Xmodel-2.5", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("XiaoduoAILab/Xmodel-2.5", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use XiaoduoAILab/Xmodel-2.5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "XiaoduoAILab/Xmodel-2.5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "XiaoduoAILab/Xmodel-2.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/XiaoduoAILab/Xmodel-2.5
- SGLang
How to use XiaoduoAILab/Xmodel-2.5 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 "XiaoduoAILab/Xmodel-2.5" \ --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": "XiaoduoAILab/Xmodel-2.5", "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 "XiaoduoAILab/Xmodel-2.5" \ --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": "XiaoduoAILab/Xmodel-2.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use XiaoduoAILab/Xmodel-2.5 with Docker Model Runner:
docker model run hf.co/XiaoduoAILab/Xmodel-2.5
Add `library_name: transformers` to metadata
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -3,13 +3,14 @@ language:
|
|
| 3 |
- en
|
| 4 |
- zh
|
| 5 |
license: apache-2.0
|
|
|
|
| 6 |
tags:
|
| 7 |
- reasoning
|
| 8 |
- small-language-model
|
| 9 |
- efficient-training
|
| 10 |
- xmodel
|
| 11 |
- xiaoduo-ai
|
| 12 |
-
|
| 13 |
---
|
| 14 |
|
| 15 |
# Xmodel-2.5: 1.3B Data-Efficient Reasoning SLM
|
|
@@ -177,4 +178,4 @@ For questions or suggestions, please contact us through:
|
|
| 177 |
|
| 178 |
## License
|
| 179 |
|
| 180 |
-
This project is licensed under the Apache-2.0 License. See the [LICENSE](LICENSE) file for details.
|
|
|
|
| 3 |
- en
|
| 4 |
- zh
|
| 5 |
license: apache-2.0
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
tags:
|
| 8 |
- reasoning
|
| 9 |
- small-language-model
|
| 10 |
- efficient-training
|
| 11 |
- xmodel
|
| 12 |
- xiaoduo-ai
|
| 13 |
+
library_name: transformers
|
| 14 |
---
|
| 15 |
|
| 16 |
# Xmodel-2.5: 1.3B Data-Efficient Reasoning SLM
|
|
|
|
| 178 |
|
| 179 |
## License
|
| 180 |
|
| 181 |
+
This project is licensed under the Apache-2.0 License. See the [LICENSE](LICENSE) file for details.
|