Text Generation
Transformers
Safetensors
qwen3_5_text
text-generation-inference
qwen
tcm
medical
math
conversational
Instructions to use zsyjsld/Xinghe1-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zsyjsld/Xinghe1-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zsyjsld/Xinghe1-9B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zsyjsld/Xinghe1-9B") model = AutoModelForCausalLM.from_pretrained("zsyjsld/Xinghe1-9B", 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 zsyjsld/Xinghe1-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zsyjsld/Xinghe1-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zsyjsld/Xinghe1-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zsyjsld/Xinghe1-9B
- SGLang
How to use zsyjsld/Xinghe1-9B 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 "zsyjsld/Xinghe1-9B" \ --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": "zsyjsld/Xinghe1-9B", "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 "zsyjsld/Xinghe1-9B" \ --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": "zsyjsld/Xinghe1-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zsyjsld/Xinghe1-9B with Docker Model Runner:
docker model run hf.co/zsyjsld/Xinghe1-9B
File size: 1,495 Bytes
9b3d432 | 1 | {"version": 3, "repo_id": "zsyjsld/Xinghe1-9B", "files": {"README.md|1782832907.1652057|3197": {"hash": "4322f83e295e37385cfd33d801f5ebadc2be61dbf2295e4f8e39e4a146f44829", "size": 3197, "status": "c"}, "README.md|1782833046.8447256|3258": {"hash": "b2a12cb359d881adb5e864d653acdb61ca35e7cb78d9642f84c1224e8f56f42f", "size": 3258, "status": "c"}, "README.md|1782833177.3364553|2843": {"hash": "5bf97455cd527b3c030ee45911287b86a9b0d3f39eca618c03da2003ea0e2fe6", "size": 2843, "status": "c"}, "README.md|1782833331.555143|3289": {"hash": "2f5426cb878ed1f3670c9ef2c429d2ce7a723e517efeba29d9f9fec46fc9aa62", "size": 3289, "status": "c"}, "README.md|1782833372.9434593|2874": {"hash": "0e5dd8622ed14de29c610dcbf6592ddf6acb6e181d6b55f1020f47bf883a74a7", "size": 2874, "status": "c"}, "README.md|1782833419.4838414|3258": {"hash": "b2a12cb359d881adb5e864d653acdb61ca35e7cb78d9642f84c1224e8f56f42f", "size": 3258, "status": "c"}, "README.md|1782833565.044987|3289": {"hash": "2f5426cb878ed1f3670c9ef2c429d2ce7a723e517efeba29d9f9fec46fc9aa62", "size": 3289, "status": "c"}, "README.md|1782833601.2437882|2874": {"hash": "0e5dd8622ed14de29c610dcbf6592ddf6acb6e181d6b55f1020f47bf883a74a7", "size": 2874, "status": "c"}, "README.md|1782833658.8881638|3259": {"hash": "5727c62a70221e865530c3379ffbd24d0bd4aa060254981052fecb197aa367b9", "size": 3259, "status": "c"}, "README.md|1782833695.419569|2844": {"hash": "0b0c0019f0e2560729c307ff6e7eb65026ec791e056f0e1da826869b452cfd82", "size": 2844, "status": "c"}}} |