Instructions to use CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata") model = AutoModelForCausalLM.from_pretrained("CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata", 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 CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata
- SGLang
How to use CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata 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 "CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata" \ --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": "CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata", "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 "CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata" \ --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": "CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata with Docker Model Runner:
docker model run hf.co/CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata
qwen3-8b-medai-cpt
Continued pre-training (mid-training) of Qwen/Qwen3-8B-Base on the CaML corpus
CompassioninMachineLearning/pretraining_research_documents_medai (revision 06248aa).
Standalone BF16 weights; no PEFT adapter is needed to load it.
Training
- Unsloth, 4-bit base during training, LoRA on all attention and MLP projections
(rsLoRA, rank 128, alpha 64, dropout 0.05);
embed_tokensandlm_headfully trained at one tenth of the body learning rate. - Learning rate 5e-5, cosine schedule, 5% warmup, weight decay 0.01, effective batch 32 sequences, max length 8192, up to 5 epochs with early stopping on held-out loss. Seed 3407.
- Full settings and package versions:
training_manifest.json. - LoRA checkpoints:
ganscs/Qwen3-8b-qwen-h100-20260909-CPT-LoRA-checkpoints. This export uses checkpoint 750, the best held-out loss of the run (1.2269).
Export
Merged with Unsloth save_pretrained_merged(save_method="merged_16bit") from checkpoint 750
into the original BF16 base weights (base revision 49e3418), 2026-09-10.
An earlier upload of the same checkpoint merged with a hand-written PEFT script
(ganscs/Qwen3-8b-qwen-h100-20260909-CPT-merged-step-750) was compared tensor by tensor
against this export: identical names, shapes and dtypes; all non-LoRA tensors bit-identical;
the LoRA-merged projections agree to within one bf16 rounding step.
Load
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "CompassioninMachineLearning/qwen3-8b-medai-cpt"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto")
- Downloads last month
- 148
Model tree for CompassioninMachineLearning/qwen3-8b-medai-cpt_olddata
Base model
Qwen/Qwen3-8B-Base