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") 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
Xinghe1-9B (杏核1代-9B)
Xinghe1-9B (杏核) is a specialized large language model fine-tuned for the formalization, computational derivation, and clinical reasoning of Huangdi Neijing. It is based on the Qwen3.5-9B-Instruct architecture and trained using the V3 Double-Purity SFT dataset.
This model is designed to systematize classical Traditional Chinese Medicine (TCM) theories into a formal mathematical framework using phase space physics and system dynamics.
Model Details
- Developed by: zsyjsld
- Base Model: Qwen/Qwen3.5-9B-Instruct
- Fine-tuning Method: QLoRA SFT (195 steps, 3 epochs) on a single RTX 3090 GPU.
- Language(s): English & LaTeX (Internal reasoning formulas), English (Output explanations)
- License: Apache 2.0 (for code/dataset) & Qwen License Agreement (for model weights)
Technical Architecture
Xinghe1-9B is trained to strictly bind clinical concepts and perform dynamical derivations inside the <think> tag, and output natural, clean clinical TCM analyses outside the <think> tag.
The internal derivation is based on the unified meta-framework:
- $x(t)$ (Yin-Yang Dynamics): Described by the formal function $F(x)$, representing self-organization and negative feedback.
- $G(x, \mu)$ (Sheng Qi / Vital Force): The primary driver of life, composed of three levels of reserves (Wei Qi -> Zong Qi -> Zang Zhen).
- $\mu(t)$ (Time / Seasonal Parameter): Time-varying external control inputs mimicking seasons and diurnal rhythms.
- $h(x)$ (Observation / Xiang Siwei): The four-channel observer (pulse, color, voice, dream) with biological/pathological noise $\epsilon$.
Usage
You can load this model using Hugging Face Transformers:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "zsyjsld/Xinghe1-9B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype="auto")
prompt = "In the process of warm disease, the patient's fever does not recede after sweating, but rises again. The pulse is rapid and restless and does not subside with sweating. It is accompanied by wild talk and inability to eat. This pattern is called Yin-Yang Separation (Yin Yang Jiao). What is the underlying mechanism of life-death transition?"
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(**model_inputs, max_new_tokens=1024)
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
Citation
If you find this project or model useful, please cite our project page:
@misc{xinghe1_9b,
author = {zsyjsld},
title = {Xinghe1-9B: Formally Modeling Huangdi Neijing},
year = {2026},
publisher = {Hugging Face / ModelScope},
howpublished = {\url{https://huggingface.co/zsyjsld/Xinghe1-9B}}
}
- Downloads last month
- 98