Text Generation
Transformers
Safetensors
English
qwen3
medical
clinical-reasoning
chain-of-thought
sft
dpo
tanit
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use TanitAI/Tanit-MedReason-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TanitAI/Tanit-MedReason-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TanitAI/Tanit-MedReason-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TanitAI/Tanit-MedReason-8B") model = AutoModelForCausalLM.from_pretrained("TanitAI/Tanit-MedReason-8B") 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 TanitAI/Tanit-MedReason-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TanitAI/Tanit-MedReason-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TanitAI/Tanit-MedReason-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TanitAI/Tanit-MedReason-8B
- SGLang
How to use TanitAI/Tanit-MedReason-8B 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 "TanitAI/Tanit-MedReason-8B" \ --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": "TanitAI/Tanit-MedReason-8B", "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 "TanitAI/Tanit-MedReason-8B" \ --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": "TanitAI/Tanit-MedReason-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TanitAI/Tanit-MedReason-8B with Docker Model Runner:
docker model run hf.co/TanitAI/Tanit-MedReason-8B
| { | |
| "train_loss": 1.662455174580505, | |
| "train_runtime": 10703.5359, | |
| "train_samples_per_second": 6.638, | |
| "total_steps": 4442, | |
| "config": { | |
| "model_path": "./outputs/phase1_phase3a_dpo_alignment", | |
| "output_dir": "./outputs/phase4_medreason_cot", | |
| "max_seq_length": 8192, | |
| "min_reasoning_length": 500, | |
| "max_reasoning_length": 4500, | |
| "learning_rate": 5e-07, | |
| "num_train_epochs": 2, | |
| "per_device_train_batch_size": 2, | |
| "gradient_accumulation_steps": 8, | |
| "warmup_ratio": 0.05, | |
| "lr_scheduler_type": "cosine", | |
| "weight_decay": 0.01, | |
| "max_grad_norm": 0.5, | |
| "optim": "adamw_torch", | |
| "adam_beta1": 0.9, | |
| "adam_beta2": 0.999, | |
| "adam_epsilon": 1e-08, | |
| "use_curriculum": true, | |
| "use_neftune": true, | |
| "neftune_noise_alpha": 5.0, | |
| "save_steps": 200, | |
| "save_total_limit": 3, | |
| "logging_steps": 10, | |
| "eval_steps": 500, | |
| "seed": 42, | |
| "bf16": true, | |
| "gradient_checkpointing": true, | |
| "dataloader_num_workers": 4 | |
| }, | |
| "dataset_size": 35526, | |
| "timestamp": "2026-01-26T21:01:07.499512" | |
| } |