Instructions to use mingdali/ChatTruth-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mingdali/ChatTruth-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mingdali/ChatTruth-7B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("mingdali/ChatTruth-7B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mingdali/ChatTruth-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mingdali/ChatTruth-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mingdali/ChatTruth-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mingdali/ChatTruth-7B
- SGLang
How to use mingdali/ChatTruth-7B 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 "mingdali/ChatTruth-7B" \ --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": "mingdali/ChatTruth-7B", "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 "mingdali/ChatTruth-7B" \ --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": "mingdali/ChatTruth-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mingdali/ChatTruth-7B with Docker Model Runner:
docker model run hf.co/mingdali/ChatTruth-7B
Commit History
-
Adding `safetensors` variant of this model
Verified signatureThis is an automated PR created with https://huggingface.co/spaces/safetensors/convert This new file is equivalent to `pytorch_model.bin` but safe in the sense that no arbitrary code can be put into it. These files also happen to load much faster than their pytorch counterpart: https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb The widgets on your model page will run using this model even if this is not merged making sure the file actually works. If you find any issues: please report here: https://huggingface.co/spaces/safetensors/convert/discussions Feel free to ignore this PR.6bdc8a0
-
Update README.md
Verified signature1cbe605
-
Update README.md
Verified signature35a32fb -
Update README.md
Verified signature621a691 -
Update visual.py
Verified signature0ef92f7 -
Upload 3 files
Verified signature4f8bdcf -
Delete tokenization_qwen.py
Verified signature08c9928 -
Delete pytorch_model.bin.index.json
Verified signature921331d -
Delete demo.jpeg
Verified signaturea02f570
-
Upload pytorch_model-00002-of-00002.bin
Verified signature217d6bb -
Upload pytorch_model-00001-of-00002.bin
Verified signature2f99ebf -
Delete pytorch_model-00002-of-00002.bin
Verified signature94861c7 -
Delete pytorch_model-00001-of-00002.bin
Verified signature01e4357
-
Update README.md
Verified signatured9d7515 -
Upload pytorch_model.bin.index.json
Verified signature5c70389 -
Delete pytorch_model.bin.index.json
Verified signaturef6654d3
-
Update README.md
a5ff545
-
Delete visual.py
2e488d0
-
Update README.md
271378d -
Upload demo.jpeg
add demod9f42f3 -
Create README.md
f49dd57 -
Upload 11 files
initad11ac2 -
Upload 2 files
init31bdc66
-
initial commit
cbff407