Pestle-27B
Ternary
achieved on a single H100 in approximately 40 hours.
Medical language models are most valuable where data is least able to leave the institution. We present Pestle-27B-Ternary, a 27-billion-parameter medical language model produced with Doses AI's proprietary ternary compression algorithm. Its deployed text-weight payload is 6.75 GB - 8.2× smaller than the 55.56 GB FP16 parent - and is packaged as one 8.48 GB runnable GGUF, while achieving a 96.48% measure-level median across a 17-measure matched evaluation record. Pestle reaches 89.79% on the full 1,273-question MedQA test split, 86.89% across MMLU medical subjects, 75.28 token-F1 on BioASQ, and 90.15 MRR on PharmaRAG. The model is also a systems proof: a single-H100 conversion workflow can turn institution-owned medical and pharmaceutical models into smaller artifacts that are acceptance-tested and served locally. We report the included benchmark record, the mortar.cpp runtime, institutional deployment patterns, and measured limitations; the compression recipe remains Doses AI intellectual property.
| Model | Pestle-27B-Ternary - a 27B medical language model derived from the Qwen3.6-27B architecture |
| Compression | Doses AI Ternary Compression Algorithm; served by mortar.cpp |
| Footprint and retention | 8.2× smaller deployed text weights - 6.75 GB versus 55.56 GB for the parent - packaged as one 8.48 GB runnable GGUF, with a 96.48% measure-level median across the 17-measure matched evaluation record |
| Conversion envelope | One H100-class GPU; private conversion and retention-calibration pipeline with public artifact and evaluation evidence |
| Headline results | MedQA 89.79 · MMLU medical 86.89 · BioASQ F1 75.28 · PharmaRAG MRR 90.15 |
| Inference | mortar.cpp - architecture-aware low-bit engine; approximately 39 tok/s single-stream and approximately 916 tok/s aggregate at concurrency 32 on retained accelerator records |
| Modality | Text generation; medical visual QA uses the parent vision encoder with the compressed language core |
| License | Apache 2.0 - open weights, open inference engine, retained evaluation evidence |
1 · Matched evidence accounting. Every measure in the reported 17-measure distribution appears in the tables and retention figure; paired MMLU subjects enter individually.
2 · Capability per deployed byte. Pestle delivers an 8.2× smaller deployed text-weight payload - 55.56 GB to 6.75 GB - with a 96.48% measure-level median across the matched evaluation set. The complete runnable GGUF is 8.48 GB.
3 · A verifiable release. Pinned artifacts, evaluation summaries, and row-level audit ledgers accompany the model, while the conversion recipe remains proprietary.
4 · A repeatable institutional proposition. Pestle demonstrates a private workflow for compressing hospital- and pharma-owned specialist models into locally deployable assets, subject to task-specific acceptance thresholds.
Clinical data cannot commute. The records, images, and messages that make medical models valuable are governed by privacy law and institutional policy, yet a matched 27B-class FP16 parent occupies 55.56 GB before runtime cache. At the small batches typical of local serving, decoding is often memory-bandwidth constrained; reducing the weight representation therefore changes where the model can run, not merely how cheaply it can be stored.
Design goal. Pestle applies a ternary operating point to this deployment constraint: maximize retained medical capability per deployed gigabyte, preserve the source architecture, and release the artifact and evidence required to verify the result. It also serves as a reference for compressing hospital- or pharma-owned specialist models against institution-defined acceptance suites, returning locally deployable assets for 8-18 GB accelerators or unified-memory workstations without making patient-data egress structural.
Pestle retains the Qwen3.6-27B architecture and is produced with Doses AI's proprietary ternary compression algorithm. Its deployed text weights total 6.75 GB; the runtime consumes the released 8.48 GB GGUF package directly, with no external cloud model required in the serving path. Figure 1 shows the conversion and serving path; Figure 2 shows the model structure.
The Doses AI Ternary Compression Algorithm converts a dense source checkpoint into a compact ternary deployment artifact while preserving the source architecture and serving interface. The production run was monitored throughout compression training with full WikiText-2 perplexity measurements. This public account reports the measured training trajectory, single-H100 compute envelope, final artifact, checksums, and matched task performance; the internal transforms, optimization targets, calibration construction, and schedules remain Doses AI intellectual property.
Block 63 is retained in BF16 because its measured quality gain outweighed its bounded footprint cost. In a paired full-corpus evaluation, changing only that block's precision lowered PPL by 0.375, or 2.96%. The BF16 block contributes 0.745 GB and 0.221 BPW across the 26.9B text-weight accounting, moving the materialized text payload from 6.002 GB / 1.785 BPW to 6.747 GB / 2.007 BPW. The result remains 8.2× smaller than the 55.56 GB BF16 parent.
The external proof is the shipped operating point: 6.75 GB of deployed text weights, one 8.48 GB runnable GGUF, approximately 40 hours on one H100, deterministic runtime checks, and the matched evaluation ledger reported in Sections 3-4.
Pestle is produced from the Qwen3.6-27B architecture with Doses AI's proprietary ternary compression algorithm. It carries 6.75 GB of deployed text weights and ships as one 8.48 GB runnable package executed by mortar.cpp. Weight-payload compression and runnable-package size are reported separately: the 8.2× ratio compares the parent's 55.56 GB of text weights with Pestle's 6.75 GB payload.
The production conversion path is designed for a single H100-class GPU, allowing specialist-model compression without a multi-node training cluster before validation against an institution's own acceptance suite. The conversion process remains Doses AI intellectual property; the released model, runtime, checksums, and benchmark record form the public verification boundary.
| Artifact view | Role | Nominal / effective BPW | Deployed text weights | Runnable artifact |
|---|---|---|---|---|
| Qwen3.6-27B FP16 parent | Matched source reference | 16.00 / 16.00 | 55.56 GB | 55.56 GB |
| Pestle-27B-Ternary | Released deployable model | 1.79 / 2.52 | 6.75 GB | 8.48 GB |
| Weight-payload ratio | Measured deployment accounting | -- | 8.2× smaller | reported separately |
| Release object | Purpose | Verification |
|---|---|---|
| Pestle-27B-Ternary model package | 8.48 GB runnable GGUF | Repository checksums |
| mortar.cpp | Local CPU, Metal, and CUDA inference | Versioned source and runtime identity |
| Evaluation ledger | Scores, row IDs, finish states, grading summaries | Pinned model and protocol metadata |
Matched protocol. The local Pestle, Qwen3.6-27B FP16, Bonsai-27B Ternary, and Qwen3.6-27B IQ2_XXS medical runs use deterministic greedy decoding with thinking disabled: temperature 0, top-p 1, top-k 0, no repetition penalty, and seed 20260805. MedQA uses the complete 1,273-row test split. Dataset-specific output allowances, loop stops, completion states, and grading summaries are retained in the evaluation ledger.
| Benchmark | Metric | Pestle | Rows | Interpretation |
|---|---|---|---|---|
| Medical knowledge, evidence and retrieval | ||||
| MedQA (full test) | accuracy | 89.79 | 1,273 | 1,143 correct; primary clinical reasoning endpoint |
| MMLU medical overview | row-weighted accuracy | 86.89 | 1,784 | overview value; subject results in Table 4A |
| BioASQ | token-F1 / exact match | 75.28 / 55.94 | 4,950 | open-ended biomedical evidence QA |
| PharmaRAG | MRR / nDCG@10 | 90.15 / 84.62 | 400 | pharmaceutical retrieval ranking |
| PubMedQA | accuracy / macro-F1 | 76.70 / 62.78 | 1,000 | biomedical yes/no/maybe reasoning |
| MedMCQA | accuracy | 68.85 | 4,183 | broad medical entrance-exam knowledge |
| MedXpertQA (text) | accuracy | 32.49 | 2,450 | expert-level, 10-option stress test |
| ChemBench | accuracy | 61.72 | 2,785 | chemistry and laboratory knowledge |
| Medical visual QA - secondary, parent vision encoder | ||||
| VQA-RAD (original test) | token-F1 / closed acc. | 53.49 / 67.73 | 451 | original split; not directly comparable to MedGemma |
| SLAKE (English) | token-F1 / closed acc. | 54.81 / 74.08 | 1,061 | experimental capability; see Section 5 |
| Broader capability | ||||
| MMLU-Redux 2.0 | accuracy | 83.53 | 5,700 | broad knowledge and reasoning |
| GSM8K / MuSR | accuracy | 93.25 / 70.50 | 1,319 / 756 | math and multi-step reasoning |
| HumanEval / HumanEval+ | pass@1 | 89.02 / 87.20 | 164 | code generation, greedy |
| MBPP+ / IFEval | pass@1 / prompt-strict | 83.33 / 81.70 | 378 / 541 | coding and instruction following |
The central result is a joint operating point: Pestle delivers an 8.2× smaller deployed text-weight payload - 55.56 GB to 6.75 GB - with a 96.48% measure-level median across 17 matched measures. The complete runnable GGUF is 8.48 GB. Each measure enters once; the MMLU medical overview is reported separately from the subject-level measures used in the matched distribution.
Small multiples preserve each benchmark's native scale and show every one of the 17 text-model measures entering the reported medical median. Pestle, Qwen FP16, Bonsai, and Qwen IQ2_XXS are locally measured under the matched protocol and use filled bars. MedGemma uses outlined bars as a published contextual reference. Missing bars indicate that no validated metric-matched value was available.
MMLU medical rows remain inside clinical knowledge and reasoning. The current model-card values are reproduced at subject level, alongside the compact IQ2_XXS reference. Parent retention is a score ratio, not a percentage-point difference.
| Benchmark | Pestle local | Qwen FP16 local | Retention | MedGemma 27B published | Bonsai 27B local | Qwen IQ2 local |
|---|---|---|---|---|---|---|
| BPW (nominal / deployed) | 1.79 / 2.52 | 16.00 / 16.00 | -- | 16.00 / 16.00 | 1.71 / 2.13 | 2.06 / 2.80 |
| Deployed weights / runnable artifact (GB) | 6.75 / 8.48 | 55.56 / 55.56 | 8.2× smaller weights | -- / 54.02 | -- / 7.17 | -- / 9.39 |
| Clinical knowledge and reasoning | ||||||
| MedQA | 89.79 | 93.87 | 95.65% | 89.8 best-of-5 87.7 zero-shot | 78.24 | 89.40 |
| MedXpertQA | 32.49 | 41.10 | 79.05% | 25.7 | 20.82 | 31.22 |
| MedMCQA | 68.85 | 73.70 | 93.42% | 74.2 | 58.59 | 68.40 |
| MMLU Anatomy | 86.67 | 92.59 | 93.61% | 83.7 | 68.15 | 84.44 |
| MMLU Clinical Knowledge | 90.19 | 92.45 | 97.56% | 86.0 | 84.53 | 90.19 |
| MMLU College Biology | 96.53 | 97.92 | 98.58% | 96.5 | 94.44 | 97.92 |
| MMLU College Medicine | 89.60 | 90.17 | 99.37% | 86.1 | 84.39 | 88.44 |
| MMLU Medical Genetics | 96.00 | 99.00 | 96.97% | 97.0 | 89.00 | 98.00 |
| MMLU Professional Medicine | 94.85 | 95.96 | 98.84% | 93.4 | 88.97 | 93.38 |
| MMLU Virology | 56.02 | 56.02 | 100.00% | 53.6 | 50.60 | 56.02 |
| Additional matched evaluations | ||||||
| ChemBench | 61.72 | 68.73 | 89.80% | -- | 61.33 | -- |
This continuation keeps open-ended biomedical extraction, retrieval, and image-conditioned tasks in the same medical evidence record. Vision values are reported as measured capabilities but are not included in the 17-measure text-model retention statistic.
| Benchmark | Pestle local | Qwen FP16 local | Retention | MedGemma 27B published | Bonsai 27B local | Qwen IQ2 local |
|---|---|---|---|---|---|---|
| Biomedical QA and retrieval | ||||||
| PubMedQA accuracy | 76.70 | 79.50 | 96.48% | 77.2 multimodal | 77.70 | 78.30 |
| PubMedQA macro F1 | 62.78 | 64.61 | 97.17% | -- | 62.17 | 57.74 |
| BioASQ token F1 | 75.28 | 76.65 | 98.21% | -- | 75.46 | -- |
| BioASQ exact match | 55.94 | 59.49 | 94.03% | -- | 54.12 | -- |
| PharmaRAG MRR | 90.15 | 93.91 | 96.00% | -- | 92.60 | -- |
| PharmaRAG nDCG@10 | 84.62 | 90.84 | 93.15% | -- | 89.43 | -- |
| Medical vision | ||||||
| CXR14 adjudicated macro F1 | 34.28 | -- | -- | 45.3 multimodal | -- | -- |
| CheXpert expert validation macro F1 | 51.03 | -- | -- | 49.9 c | -- | -- |
| VQA-RAD tokenized F1 | 53.49 | 66.69 | 80.21% | 46.7 multimodal | -- | -- |
| SLAKE tokenized F1 | 54.81 | 76.60 | 71.55% | 70.3 multimodal | -- | -- |
The medical specialization does not eliminate broad capability. The general matrix is shown directly after the medical record, using the final values on the release card. These rows provide operating context; different sources and protocols are not blended into the medical retention statistic.
| Benchmark | Pestle | Qwen FP16 | Bonsai ternary | Qwen Q4_K_XL | Qwen IQ2_XXS | Gemma4-31B |
|---|---|---|---|---|---|---|
| Knowledge and reasoning | ||||||
| MMLU-Redux | 83.53 | 93.50 | 88.05 | 93.35 | 88.93 | 93.60 |
| MuSR | 70.50 | 72.88 | 65.87 | 73.01 | 66.99 | 71.03 |
| Math | ||||||
| GSM8K | 93.25 | 95.30 | 96.06 | 96.66 | 89.90 | 97.57 |
| Coding | ||||||
| HumanEval+ | 87.20 | 95.12 | 93.90 | 95.73 | 91.46 | 96.34 |
| MBPP+ | 83.33 | 83.33 | 81.22 | 83.86 | 78.89 | 84.39 |
| Instruction following | ||||||
| IFEval prompt-strict | 81.70 | 88.91 | 85.03 | 88.83 | 84.03 | 90.57 |
The matched medical-text benchmarks used in the V6 retention analysis appear above the general context. Paired rows connect Pestle to Qwen FP16 on a common score scale; rows without a matched parent show a single Pestle marker.
Pestle is the public proof point for a broader product: Doses AI can compress specialist models owned or commissioned by hospitals, pharmaceutical companies, regional providers, and clinical software teams. The customer keeps the model already adapted to its terminology, policies, evidence base, or therapeutic area; compression and acceptance testing turn it into a smaller, locally deployable asset.
| Stage | Primary input | Recorded output | Acceptance condition |
|---|---|---|---|
| 1 · Specify | Source checkpoint and intended tasks | Immutable source hash; scope statement | Ownership, licence, and intended use confirmed |
| 2 · Compress | Checkpoint and calibration cases | Candidate ternary artifact | Conversion completes inside the approved environment |
| 3 · Evaluate | Frozen task and safety suite | Row-level results and deltas | Predefined capability and safety thresholds met |
| 4 · Package | Accepted weights and runtime | Versioned artifact, hashes, runbook | Reproduction and rollback checks pass |
| 5 · Operate | Approved local deployment | Monitoring and review record | Use remains within the validated scope |
The measured proof is an 8.2× smaller deployed text-weight payload - 55.56 GB to 6.75 GB - with a 96.48% measure-level median across the 17-measure matched evaluation record. The complete runnable GGUF is 8.48 GB. Realized serving savings depend on sequence length, batching, cache, and hardware. The product proposition is the repeatable combination of compression, retention calibration, matched evaluation, deployment packaging, and governance evidence.
For visual QA, images pass through the parent's vision encoder into the compressed language core; the ternary representation applies to the text decoder. On the original 451-row VQA-RAD test split Pestle reaches 53.49 token-F1 / 67.73 closed-question accuracy - above MedGemma 27B's published 46.7 / 67.1, noting MedGemma's figures use a different (balanced, image-disjoint) split - while on SLAKE it trails (54.81 vs 70.3). Every example below is reproduced verbatim from the retained evaluation record: an exact- or near-exact-match row, shown with its original benchmark image and row ID. They illustrate the behavior behind the scores; they are benchmark examples, not clinical validation.






Every input and output on this spread is reproduced unedited from the retained benchmark record - the same runs behind Table 3.
mortar.cpp executes the released Pestle-27B-Ternary model directly in one decode loop. The engine is evaluated as part of the release, rather than treated as an implementation footnote.
This is not a claim of full-logit parity and not a comparison to the Qwen parent. The 153-token check compares Mortar with a dense materialization of the same Pestle checkpoint - the same compressed factors represented densely for validation. The Metal/CUDA check verifies cross-backend token identity under one deterministic prompt. Both checks are useful engineering evidence, but neither substitutes for the benchmark suite.
The smaller model changes who can build around a 27B-class medical system. An accelerator room is no longer the only viable serving environment: a hospital can keep inference beside governed data, while a community pharmacy, family practice, regional laboratory, or specialty clinic can place assistive retrieval and drafting on workstation-class hardware.
| Setting | Representative hardware | Local resources | Required controls |
|---|---|---|---|
| Workstation | 18 GB unified-memory system | Model runtime; approved documents or formulary | User authentication, local logs, professional review |
| Clinical server | Single accelerator | Internal model API; retrieval index; audit store | Network isolation, access control, monitoring, rollback |
| Private cluster | Hospital, pharma, or health-system infrastructure | Governed model service; approved clinical or research data | Institutional validation, security review, change control |
Health-system deployment. Validate prospectively on representative local workflows; isolate the service; pin model and engine checksums; control access to PHI; test subgroups and foreseeable harms; monitor drift, latency, refusals, loops, and human override; retain rollback artifacts.
Small-provider deployment. Keep the scope assistive and narrow: formulary and guideline retrieval, document QA, draft letters, coding support, or staff-facing summaries. Use approved local corpora, keep a professional in the review path, and avoid autonomous diagnosis, prescribing, treatment, or triage.
Pestle is a research model, not a medical device. It must not directly determine diagnosis, treatment, prescribing, triage, or any other clinical decision. Outputs can be inaccurate, incomplete, biased, repetitive, or confidently wrong; every output is preliminary and requires qualified professional review. Benchmark performance does not establish clinical safety, efficacy, or population-level generalization.
Before any healthcare deployment, developers are responsible for task-specific adaptation and prospective validation; privacy, security, and data-governance review; subgroup and foreseeable-harm evaluation; human-oversight design; monitoring; and compliance with applicable medical-device, health-information, and AI regulation. Do not submit identifiable patient information to an environment not approved to process it.
Pestle-27B-Ternary demonstrates a valuable operating point: an 8.2× smaller deployed text-weight payload - 55.56 GB to 6.75 GB - with a 96.48% measure-level median across the complete 17-measure matched evaluation record. The model is packaged as one 8.48 GB runnable GGUF. Pestle is both an open model and a proof of process. The same compression, matched evaluation, and deployment packaging can be applied to institution-owned medical and pharmaceutical models, with customer-specific acceptance criteria and without making external inference a structural requirement. The released weights, engine, and evidence establish the measured operating point; the repeatable compression and validation workflow is the product.
[1] Doses AI. Pestle-27B-Ternary model card and evaluation evidence. Commit 1bcd51a8d74a7e4ff1384192f82ea2d358f9ce24, 2026.
[2] Doses AI. mortar.cpp: architecture-aware low-bit inference. github.com/DosesAI/mortar.cpp, 2026.
[3] Sellergren et al. MedGemma Technical Report. arXiv:2507.05201, 2025.
[4] Google Research. Next-generation medical image interpretation with MedGemma 1.5. research.google/blog, 2026.
[5] Prism ML. Bonsai 27B: full 27B-class reasoning in binary and ternary transformer weights. Whitepaper, July 2026.
[6] Ma et al. The Era of 1-bit LLMs: All Large Language Models are in 1.58 Bits. arXiv:2402.17764, 2024.
[7] Qwen Team. Qwen3.6-27B model card. Hugging Face, 2026.
[8] Jin et al. What Disease Does This Patient Have? MedQA. Applied Sciences, 2021; GBaker/MedQA-USMLE-4-options.
[9] Lau et al. VQA-RAD: a dataset of clinically generated visual questions about radiology images. Scientific Data, 2018.
[10] Liu et al. SLAKE: a semantically-labeled knowledge-enhanced dataset for medical VQA. ISBI, 2021.
[11] Liu et al. EvalPlus: rigorous evaluation of LLM-synthesized code. NeurIPS, 2023.
[12] Zhou et al. IFEval: instruction-following evaluation for LLMs. arXiv:2311.07911, 2023.
[13] Zuo et al. MedXpertQA: benchmarking expert-level medical reasoning. arXiv, 2025.
[14] Tsatsaronis et al. BioASQ. BMC Bioinformatics, 2015. [15] Gao et al. lm-evaluation-harness v0.4.12. EleutherAI, 2026.
[16] U.S. FDA, Health Canada, MHRA. Good Machine Learning Practice for Medical Device Development. Guiding principles.