Repository navigation
Getting Started
Sudhanshu Shukla edited this page Nov 23, 2026
·
2 revisions
Follow the repository README for supported dependencies. This page uses PowerShell for illustration; equivalent shell commands work elsewhere.
git clone https://github.com/su394611-del/MedSparse-Healthcare-LLM-From-Scratch.git
Set-Location MedSparse-Healthcare-LLM-From-Scratch
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -e . --no-depsIf the system requires a platform-specific PyTorch distribution, follow the official PyTorch installation selector and confirm that the intended runtime is available. Do not assume that a generic dependency installation selects the appropriate runtime.
python -c "from mixtral_lab import MixtralLM, ModelConfig; print('Model import OK')"
python -m scripts.pretrain_healthcare --help
python -m scripts.finetune_medical --help
python -m pytest -q- Audit eligible healthcare corpus records.
- Train or load a healthcare-domain tokenizer, and validate its special-token IDs.
- Choose a model configuration whose
vocab_sizeexactly matches the tokenizer. - Run Stage 1: pretraining from random weights.
- Inspect the Stage 1 checkpoint and manifest.
- Run Stage 2: full-parameter medical SFT with the same tokenizer and architecture.
- Evaluate, review provenance, and record limitations.
See Tokenizer, Pretraining from Scratch, and Medical SFT for commands.
python -c "from mixtral_lab.config import ModelConfig; c=ModelConfig.from_json('configs/healthcare_moe_1b.json'); print(c)"The command above only inspects the example architecture. Do not substitute a different configuration when loading a pretrained checkpoint. Use the exact architecture and tokenizer associated with that checkpoint.
Foundations
Data and Training
Operation and Quality
- Checkpoints and Resume
- Evaluation and Validation
- Testing and Reproducibility
- Troubleshooting
- Long Context and Limitations
Architecture diagrams