Text Generation
Transformers
Safetensors
Chinese
qwen3
traditional-chinese-medicine
lingdan-v2
r1
conversational
text-generation-inference
Instructions to use TCMLLM/Lingdan-8B-R1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TCMLLM/Lingdan-8B-R1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TCMLLM/Lingdan-8B-R1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TCMLLM/Lingdan-8B-R1") model = AutoModelForCausalLM.from_pretrained("TCMLLM/Lingdan-8B-R1", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TCMLLM/Lingdan-8B-R1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TCMLLM/Lingdan-8B-R1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TCMLLM/Lingdan-8B-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TCMLLM/Lingdan-8B-R1
- SGLang
How to use TCMLLM/Lingdan-8B-R1 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 "TCMLLM/Lingdan-8B-R1" \ --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": "TCMLLM/Lingdan-8B-R1", "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 "TCMLLM/Lingdan-8B-R1" \ --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": "TCMLLM/Lingdan-8B-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TCMLLM/Lingdan-8B-R1 with Docker Model Runner:
docker model run hf.co/TCMLLM/Lingdan-8B-R1
Link arXiv paper and preserve both Lingdan citations
Browse filesREADME-only: add arXiv entry points, citation metadata and versioned evaluation sources.
README.md
CHANGED
|
@@ -28,6 +28,7 @@ tags:
|
|
| 28 |
</p>
|
| 29 |
|
| 30 |
<p align="center">
|
|
|
|
| 31 |
<a href="https://huggingface.co/collections/TCMLLM/lingdan-v2"><img src="https://img.shields.io/badge/Models-Hugging_Face-FFD21E?logo=huggingface&logoColor=black" alt="Hugging Face models" /></a>
|
| 32 |
<a href="https://modelscope.cn/collections/TCMAIBJTU/Lingdan-V2"><img src="https://img.shields.io/badge/Models-ModelScope-624AFF" alt="ModelScope models" /></a>
|
| 33 |
<a href="https://github.com/TCMAI-BJTU/LingLan"><img src="https://img.shields.io/badge/Benchmark-LingLan-2A8F5B" alt="LingLan benchmark" /></a>
|
|
@@ -35,7 +36,7 @@ tags:
|
|
| 35 |
<a href="https://github.com/TCMAI-BJTU/Lingdan-V2/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache--2.0-D22128" alt="Apache License 2.0" /></a>
|
| 36 |
</p>
|
| 37 |
|
| 38 |
-
[Model](#model-details) · [Results](#checkpoint-evaluation) · [Quickstart](#quickstart) · [vLLM](#vllm-deployment) · [Prompts](#task-prompts) · [Citation](#citation)
|
| 39 |
|
| 40 |
## Model Details
|
| 41 |
|
|
@@ -62,7 +63,7 @@ This checkpoint includes the following training stages, in order:
|
|
| 62 |
|
| 63 |
## Checkpoint Evaluation
|
| 64 |
|
| 65 |
-
|
| 66 |
|
| 67 |
| Metric | LingLan Full | LingLan-Hard |
|
| 68 |
| --- | ---: | ---: |
|
|
@@ -313,14 +314,17 @@ Lingdan-V2 model weights and project-owned documentation and images are released
|
|
| 313 |
|
| 314 |
## Citation
|
| 315 |
|
| 316 |
-
|
| 317 |
|
| 318 |
```bibtex
|
| 319 |
@misc{hua2026lingdanv2,
|
| 320 |
title = {{Lingdan-V2}: Large language models for clinically grounded reasoning in traditional Chinese medicine},
|
| 321 |
author = {Hua, Rui and Wei, Yu and Jin, Ziri and Sun, Zhuo and Chang, Kai and Xia, Jianan and Shu, Zixin and Li, Xiaodong and Jia, Dongmei and Dong, Fei and Zhang, Runshun and Yu, Jian and Xu, Hao and Yu, Haibin and Li, Jiansheng and Liu, Baoyan and Wang, Wenjia and Zhou, Xuezhong},
|
| 322 |
year = {2026},
|
| 323 |
-
|
|
|
|
|
|
|
|
|
|
| 324 |
}
|
| 325 |
|
| 326 |
@article{hua2024lingdan,
|
|
@@ -337,4 +341,4 @@ Cite Lingdan-V2 and the earlier Lingdan work:
|
|
| 337 |
|
| 338 |
## Related Links
|
| 339 |
|
| 340 |
-
[GitHub](https://github.com/TCMAI-BJTU/Lingdan-V2) · [Hugging Face collection](https://huggingface.co/collections/TCMLLM/lingdan-v2) · [ModelScope collection](https://modelscope.cn/collections/TCMAIBJTU/Lingdan-V2) · [LingLan benchmark](https://github.com/TCMAI-BJTU/LingLan)
|
|
|
|
| 28 |
</p>
|
| 29 |
|
| 30 |
<p align="center">
|
| 31 |
+
<a href="https://arxiv.org/abs/2610.14705"><img src="https://img.shields.io/badge/arXiv-2610.14705-B31B1B?logo=arxiv&logoColor=white" alt="Lingdan-V2 paper on arXiv" /></a>
|
| 32 |
<a href="https://huggingface.co/collections/TCMLLM/lingdan-v2"><img src="https://img.shields.io/badge/Models-Hugging_Face-FFD21E?logo=huggingface&logoColor=black" alt="Hugging Face models" /></a>
|
| 33 |
<a href="https://modelscope.cn/collections/TCMAIBJTU/Lingdan-V2"><img src="https://img.shields.io/badge/Models-ModelScope-624AFF" alt="ModelScope models" /></a>
|
| 34 |
<a href="https://github.com/TCMAI-BJTU/LingLan"><img src="https://img.shields.io/badge/Benchmark-LingLan-2A8F5B" alt="LingLan benchmark" /></a>
|
|
|
|
| 36 |
<a href="https://github.com/TCMAI-BJTU/Lingdan-V2/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache--2.0-D22128" alt="Apache License 2.0" /></a>
|
| 37 |
</p>
|
| 38 |
|
| 39 |
+
[Paper](https://arxiv.org/abs/2610.14705) · [Model](#model-details) · [Results](#checkpoint-evaluation) · [Quickstart](#quickstart) · [vLLM](#vllm-deployment) · [Prompts](#task-prompts) · [Citation](#citation)
|
| 40 |
|
| 41 |
## Model Details
|
| 42 |
|
|
|
|
| 63 |
|
| 64 |
## Checkpoint Evaluation
|
| 65 |
|
| 66 |
+
Results for **Lingdan-8B-R1** reported in [Lingdan-V2 (arXiv:2610.14705v1)](https://arxiv.org/abs/2610.14705v1). Full: LingLan (25,620 items); Hard: LingLan-Hard (5,200 items). Overall Score averages 16 primary metrics, excluding dose MAE. All scores use a 0–100 scale except MAE (lower is better). The paper uses zero-shot Chinese prompts, temperature 0.6, and at most 8,192 generated tokens; reproduction also requires the same data and scoring pipeline.
|
| 67 |
|
| 68 |
| Metric | LingLan Full | LingLan-Hard |
|
| 69 |
| --- | ---: | ---: |
|
|
|
|
| 314 |
|
| 315 |
## Citation
|
| 316 |
|
| 317 |
+
Please cite Lingdan-V2 and the earlier Lingdan work:
|
| 318 |
|
| 319 |
```bibtex
|
| 320 |
@misc{hua2026lingdanv2,
|
| 321 |
title = {{Lingdan-V2}: Large language models for clinically grounded reasoning in traditional Chinese medicine},
|
| 322 |
author = {Hua, Rui and Wei, Yu and Jin, Ziri and Sun, Zhuo and Chang, Kai and Xia, Jianan and Shu, Zixin and Li, Xiaodong and Jia, Dongmei and Dong, Fei and Zhang, Runshun and Yu, Jian and Xu, Hao and Yu, Haibin and Li, Jiansheng and Liu, Baoyan and Wang, Wenjia and Zhou, Xuezhong},
|
| 323 |
year = {2026},
|
| 324 |
+
eprint = {2610.14705},
|
| 325 |
+
archivePrefix = {arXiv},
|
| 326 |
+
primaryClass = {cs.CL},
|
| 327 |
+
url = {https://arxiv.org/abs/2610.14705}
|
| 328 |
}
|
| 329 |
|
| 330 |
@article{hua2024lingdan,
|
|
|
|
| 341 |
|
| 342 |
## Related Links
|
| 343 |
|
| 344 |
+
[Paper](https://arxiv.org/abs/2610.14705) · [GitHub](https://github.com/TCMAI-BJTU/Lingdan-V2) · [Hugging Face collection](https://huggingface.co/collections/TCMLLM/lingdan-v2) · [ModelScope collection](https://modelscope.cn/collections/TCMAIBJTU/Lingdan-V2) · [LingLan benchmark](https://github.com/TCMAI-BJTU/LingLan)
|