Instructions to use Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit") model = AutoModelForCausalLM.from_pretrained("Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit
- SGLang
How to use Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit 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 "Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit with Docker Model Runner:
docker model run hf.co/Yhyu13/Xwin-Math-7B-V1.0-GPTQ-4bit
GPTQ 4-bit actor order version that works in textgen-webui with exllamav2
Generated by using scripts from https://gitee.com/yhyu13/llama_-tools
Original weight : https://huggingface.co/Xwin-LM/Xwin-Math-7B-V1.0
| Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
|---|---|---|---|---|---|---|---|---|---|
| main | 4 | 128 | Yes | 0.1 | code | 4096 | 4.4GB | Yes | 4-bit, with Act Order. 128 group size |
Here is some testing done in textgen-webui, I was using Q&A from this dataset https://huggingface.co/datasets/TIGER-Lab/MathInstruct
Basic arithmatic, the answer (A) is correct

Does not follow the instruction to write python code. And hulluciate an answer not in exists in options

Answer is correct, but hulluciate with a not existing option

- Downloads last month
- 2