Run this model with HF Jobs
Run EPFLiGHT/Apertus-8B-MeditronFO-FP8 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/EPFLiGHT/Apertus-8B-MeditronFO-FP8. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/EPFLiGHT/Apertus-8B-MeditronFO-FP8 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/EPFLiGHT/Apertus-8B-MeditronFO-FP8. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use EPFLiGHT/Apertus-8B-MeditronFO-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EPFLiGHT/Apertus-8B-MeditronFO-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EPFLiGHT/Apertus-8B-MeditronFO-FP8") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EPFLiGHT/Apertus-8B-MeditronFO-FP8") model = AutoModelForCausalLM.from_pretrained("EPFLiGHT/Apertus-8B-MeditronFO-FP8", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use EPFLiGHT/Apertus-8B-MeditronFO-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EPFLiGHT/Apertus-8B-MeditronFO-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EPFLiGHT/Apertus-8B-MeditronFO-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/EPFLiGHT/Apertus-8B-MeditronFO-FP8
- SGLang
How to use EPFLiGHT/Apertus-8B-MeditronFO-FP8 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 "EPFLiGHT/Apertus-8B-MeditronFO-FP8" \ --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": "EPFLiGHT/Apertus-8B-MeditronFO-FP8", "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 "EPFLiGHT/Apertus-8B-MeditronFO-FP8" \ --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": "EPFLiGHT/Apertus-8B-MeditronFO-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use EPFLiGHT/Apertus-8B-MeditronFO-FP8 with Docker Model Runner:
docker model run hf.co/EPFLiGHT/Apertus-8B-MeditronFO-FP8
Apertus-8B-MeditronFO-FP8
[Website]
[Hugging Face]
[Preprint]
[GitHub]
[Dataset]
License: Apache 2.0 | Authors: LiGHT
FP8 version of Apertus-8B-MeditronFO, our small fully open medical LLM. It takes 9.1 GB instead of 16.1 GB. It scores like the bf16 model on multiple-choice medical benchmarks and about 2 points lower on HealthBench.
- Format: FP8 weights (per-channel scales) and dynamic per-token FP8 activations, in the compressed-tensors format;
lm_headstays in bf16 - Made with: llm-compressor 0.15 (
FP8_DYNAMICscheme, no calibration data) - Runs on: vLLM, on GPUs with FP8 support (NVIDIA Hopper, Ada Lovelace, Blackwell)
Benchmark
Accuracy (%) of the bf16 and FP8 models in the same harness (lm-eval, chat template, up to 4,096 new tokens).
| Benchmark | bf16 greedy | FP8 greedy | bf16 mean@4 | FP8 mean@4 |
|---|---|---|---|---|
| MedQA | 60.7 | 61.3 | 57.8 ± 1.5 | 57.2 ± 1.4 |
| MedMCQA | 52.0 | 50.9 | 50.3 ± 0.2 | 49.7 ± 0.5 |
| PubMedQA | 71.4 | 73.1 | 68.9 ± 0.6 | 70.0 ± 0.4 |
| MedXpertQA | 15.1 | 14.3 | 13.6 ± 0.5 | 14.2 ± 0.5 |
| MMLU-Pro health | 48.3 | 48.7 | 44.8 ± 2.1 | 44.9 ± 2.1 |
| IFEval (prompt, strict) | 38.6 | 39.2 | 39.2 ± 1.9 | 37.6 ± 1.3 |
| HealthBench (Gemma-4-31B grader) | 42.6 ± 0.3 | 40.5 ± 0.5 |
mean@4: four runs at temperature 0.7 with different seeds, mean ± standard deviation of the four scores. On the multiple-choice benchmarks and IFEval every FP8 − bf16 gap is within the run-to-run spread; on HealthBench (all 5,000 conversations) FP8 is 2.2 points lower, on every rubric axis.
Usage
vllm serve EPFLiGHT/Apertus-8B-MeditronFO-FP8
from vllm import LLM, SamplingParams
llm = LLM(model="EPFLiGHT/Apertus-8B-MeditronFO-FP8")
messages = [
{"role": "user", "content": "A 62-year-old woman presents with a three-day history of dyspnea on exertion and a productive cough. What is the differential diagnosis?"},
]
out = llm.chat(messages, SamplingParams(temperature=0.7, max_tokens=8192))
print(out[0].outputs[0].text)
For the full-precision model, training details and the paper's evaluation, see Apertus-8B-MeditronFO.
Limitations & intended use
MeditronFO can produce text on a variety of topics, but the generated content may not always be factually accurate, logically consistent, or free from biases present in the training data. MeditronFO has been trained to be specialised for Medicine and is intended to be used for Medicine related tasks evaluation. These models should be used as assistive tools rather than definitive sources of information. Users should always verify important information and critically evaluate any generated content.
Citation
@misc{theimerlienhard2026meditronfoauditablepipelineclinical,
title = {MeditronFO: An Auditable Pipeline for Clinical LLMs},
author = {Xavier Theimer-Lienhard and Vadim El Guedj and Mushtaha El-Amin and Fay Elhassan and Sahaj Vaidya and Kristina Keitel and David Sasu and Lars Klein and Mary-Anne Hartley},
year = {2026},
eprint = {2605.16215},
archivePrefix = {arXiv},
primaryClass = {cs.AI},
url = {https://arxiv.org/abs/2605.16215}
}
Contact
Please use the community tab for any discussions or issue related to this model. Questions related to the project can be sent to xavier.theimer-lienhard@epfl.ch or mary-anne.hartley@epfl.ch.
- Downloads last month
- 55
Model tree for EPFLiGHT/Apertus-8B-MeditronFO-FP8
Base model
swiss-ai/Apertus-8B-2509