Skip to content
Sudhanshu ShuklaAI Lab · GenAI Engineering
Menu
Technical reportVersion 0.9 · 23 November 2026

MedSparse Healthcare: A Sparse Mixture-of-Experts Medical Language Model Trained from Scratch on Consumer Hardware

Sudhanshu Shukla · Independent researcher, Bengaluru, India

Download PDF · 7 pages DOI · 10.5281/zenodo.24461542 ↗ LaTeX source Code ↗ Models ↗ Try it in the browser

Abstract

We describe MedSparse Healthcare, a 38.8M-parameter decoder-only language model whose feed-forward layers are sparse mixtures of experts (four experts per layer, top-2 routing), trained from random initialization on healthcare text with a 30,001-token byte-level BPE tokenizer learned only from biomedical documents. Stage 1 pretrains on openly licensed PubMed full text from the Common Pile; Stage 2 applies full-parameter, completion-only supervised fine-tuning (SFT) on medical question–answer pairs. Evaluated with a float32 inference engine that runs in the browser, Stage 2 lowers held-out medical answer perplexity from 692.5 to 252.9 (ratio 0.365, 95% CI 0.343–0.389) while PubMed perplexity rises by 17% (ratio 1.166, 95% CI 1.087–1.244), and expert routing stays balanced (normalized routing entropy ≥ 0.966 in every layer). Multiple-choice accuracy on 150 MedMCQA validation questions (32.7% and 28.7%) is not distinguishable from the 25% chance level and stays below the 38% majority-answer baseline, which we report as a limitation of models at this scale. Stage 3 continues full-parameter SFT over all 5.8 million MIRIAD question–answer pairs, with a validation split that keeps whole source papers out of training, on a single consumer-grade GPU; it is in progress, and its results will be reported in version 1.0 of this report. We release the weights under the Apache License 2.0, together with the training code, the evaluation harness, and practical lessons for training on consumer hardware. The model is a research artifact and is not intended for clinical use.

Key results

Held-out metricStage 1 · pretrainedStage 2 · medical SFT
Medical Q&A answer perplexity692.47 [643.46, 740.98]252.86 [233.14, 273.47]
PubMed perplexity572.15 [472.93, 704.14]667.04 [546.16, 822.56]
MedMCQA accuracy (150 questions)32.7% [25.7, 40.5]28.7% [22.0, 36.4]
Lowest routing entropy across layers0.9660.982

95% intervals in brackets: bootstrap over items for perplexity, Wilson for accuracy. Chance on MedMCQA is 25%; always picking the most common answer gives 38%. Full method and numbers are in the report and in results.json.

Status

Version 0.9 (preprint). Stage 3, full-parameter fine-tuning on all 5.8 million MIRIAD question–answer pairs, is still training. Version 1.0 will add its results, measured with the same evaluation harness.

Cite this report

@techreport{shukla2026medsparse,
  title       = {MedSparse Healthcare: A Sparse Mixture-of-Experts Medical
                 Language Model Trained from Scratch on Consumer Hardware},
  author      = {Shukla, Sudhanshu},
  institution = {Independent researcher},
  type        = {Technical Report},
  number      = {Version 0.9},
  year        = {2026},
  month       = nov,
  doi         = {10.5281/zenodo.24461542},
  url         = {https://su394611-del.github.io/research/medsparse-healthcare-2026/}
}

Versions

Responsible use

MedSparse Healthcare is a research model. It is not a medical device and must not be used for diagnosis, treatment, triage, medication dosing or patient communication. It is an independent implementation inspired by the Mixtral architecture; it does not use or distribute Mistral AI or Mixtral weights and is not affiliated with Mistral AI.