Instructions to use dubito-inc/gan-cao-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dubito-inc/gan-cao-v3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dubito-inc/gan-cao-v3")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("dubito-inc/gan-cao-v3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dubito-inc/gan-cao-v3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dubito-inc/gan-cao-v3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dubito-inc/gan-cao-v3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dubito-inc/gan-cao-v3
- SGLang
How to use dubito-inc/gan-cao-v3 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 "dubito-inc/gan-cao-v3" \ --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": "dubito-inc/gan-cao-v3", "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 "dubito-inc/gan-cao-v3" \ --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": "dubito-inc/gan-cao-v3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dubito-inc/gan-cao-v3 with Docker Model Runner:
docker model run hf.co/dubito-inc/gan-cao-v3
MODEL CARD AND MASSIF CLASSIFICATION BADGE GAN-CAO-V3 language: - zh - en tags: - traditional-chinese-medicine - massif - bilingual - accelerator-class license: apache-2.0 metrics: - name: MASSIF τ_eff value: 0.93 - name: MASSIF Class value: Accelerator
🌿 Gan Cao v3
Bilingual Traditional Chinese Medicine LLM - MASSIF Accelerator Class
Gan Cao v3 is a 63.5M parameter bilingual model fine-tuned from Gan Cao v2 on Traditional Chinese Medicine (TCM) and Classical Chinese texts. It achieves MASSIF Accelerator classification with τ_eff = 0.93 under the N=50 stress-prompt protocol. In separate real-time telemetry comparisons under conversational prompts, Gan Cao v3 shows lower curvature variance and more persistence-positive trajectories than Qwen-2.5-7B used as its "teacher".
🏆 MASSIF Classification
| Model | Class | Δt | Flip Rate | τ_eff |
|---|---|---|---|---|
| Gan Cao v1 | Neutral | -1.0 | 100% | 0.00 |
| Gan Cao v2 | Neutral | 0.2 | 90% | 0.58 |
| Gan Cao v3 | Accelerator | < -2 | < 70% | 0.93 |
Key insight: Fine-tuning on bilingual TCM data pushed the model from Neutral → Accelerator regime while preserving efficient 63.5M parameter architecture.
Architecture
- d_model: 512
- n_layers: 12
- n_heads: 8
- Parameters: 63.5M
- Architecture: Pre-LN + RMSNorm + SwiGLU + RoPE
Training Data (85 bilingual pairs)
| Source | Count |
|---|---|
| TCM Books (surgical/textbook) | 34 |
| Classical Chinese translations | 50 |
| TCMChat knowledge QA | 1 |
Usage
from transformers import AutoTokenizer
from architecture.model import MASSIFModel
from architecture.config import MASSIFConfig
# Load model
config = MASSIFConfig(d_model=512, n_layers=12, n_heads=8)
model = MASSIFModel.from_pretrained("dubito-inc/gan-cao-v3")
tokenizer = AutoTokenizer.from_pretrained('gpt2')
tokenizer.pad_token = tokenizer.eos_token
# Generate English response
prompt = "What is Qi in Traditional Chinese Medicine?"
inputs = tokenizer(prompt, return_tensors='pt')
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0]))
# Generate bilingual understanding
prompt_zh = "什么是阴阳平衡?"
inputs = tokenizer(prompt_zh, return_tensors='pt')
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0]))
Model tree for dubito-inc/gan-cao-v3
Base model
dubito-inc/gan-cao-v2