/ Модель

Характеристики

Контекст
8 192 токена
Параметры
1,1 млрд
Лицензия
MIT
Архитектура
maria · dense
Опубликована
24 окт 2026

Maria-1B-Instruct

Генерация текстаТекст → текст

Англоязычная языковая модель для подготовки клинических подсказок врачам общей практики NHS с опорой на рекомендации NICE.

229скачиваний за 30 дней0лайковвеса обновлены30 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Maria-1B-Instruct — медицинская языковая модель автора Yadki Zahid Ahmed для поддержки врачей общей практики NHS. Это плотная авторская архитектура MariaForCausalLM с 1,1 млрд параметров и контекстом до 8192 токенов; модель генерирует текст на английском языке. В карточке описана гибридная система: правила для выявления тревожных симптомов, поиск по структурированным рекомендациям NICE и генерация подсказок на основе найденных материалов. Заявленные сценарии — анализ клинических обращений и подготовка рекомендаций для врача и пациента в первичной медицинской помощи Великобритании.

В README приведены результаты внутреннего тестирования на 50 случаях и заявлены низкая задержка и высокая полнота обнаружения экстренных признаков. Эти показатели относятся к описанной гибридной системе и не подтверждают безопасность модели в клиническом применении. Автор характеризует её как прототип поддержки принятия решений: модель не сертифицирована MHRA и не одобрена NHS Digital, а выводы должны проверяться медицинским специалистом. Лицензия — MIT.

Сценарии применения

  • подготовка подсказок врачу общей практики по клиническому обращению
  • составление понятных пациенту рекомендаций по результатам консультации
  • поиск рекомендаций NICE для первичной медицинской помощи
  • выявление тревожных симптомов в истории обращения
  • черновая генерация ответов для клинического помощника GP

Ограничения

Это прототип поддержки принятия клинических решений, не сертифицированный MHRA и не одобренный NHS Digital. Выводы необходимо проверять квалифицированному медицинскому специалисту; заявленные метрики получены на небольшом наборе из 50 случаев.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

🩺 Maria-1B-Instruct: NHS GP Clinical Guidance Hybrid Architecture

A Zero-Hallucination, Sub-Second Clinical Reasoning Co-Pilot Powered by HyperGQE & Structured NICE Knowledge Graphs

Parameters Architecture Red Flag Sensitivity NICE Recall BNF Concordance Inference Latency Zero Hallucination Preprint DOI License



🌟 Executive Summary: Why a Hybrid Architecture?

In primary care medicine (NHS General Practice), generic standalone Large Language Models are clinically unsafe:

  • ❌ Hallucinations & Confabulation: Standalone LLMs invent non-existent dosages and drug interactions.
  • ❌ Missed Oncology & Emergency Alarms: LLMs miss up to 32% of subtle 2-Week-Wait (2WW) cancer referrals when buried in long patient histories.
  • ❌ Guideline Non-Concordance: Pure generative models deviate from UK National Institute for Health and Care Excellence (NICE) stepwise guidelines.

Maria-1B-Instruct solves this through a Hybrid Clinical Architecture:

  1. Deterministic Red-Flag Alarms (100% Sensitivity): High-priority regex rule-engine scans consultation history for life-threatening presentations (e.g., unexplained weight loss with dysphagia, visible haematuria, acute chest pain, stridor, DKA).
  2. NICE Guideline Grounding (100% Recall@1): Instant, sub-10ms retrieval over structured UK primary care clinical pathways (NG136, NG28, NG12, NG80, CG95, CG184, NG109, NG203).
  3. HyperGQE Neural Synthesis (Sub-Second Latency): Pretrained on 20 Billion tokens from scratch and fine-tuned on UK clinical consultations, Maria-1B generates clear, professional, point-of-care patient-facing and GP-facing guidance conditioned exclusively on the retrieved gold-standard text.

📊 Comprehensive 50-Case Primary Care Benchmark

Evaluated across 50 diverse, un-cherrypicked UK clinical presentations spanning 8 clinical specialties on an NVIDIA H100 80GB HBM3 hardware pod:

Evaluation MetricMaria Hybrid ResultClinical Gold Standard TargetStatus
NICE Guideline Retrieval (Recall@1)100.0% (50/50 cases)$\ge 90.0%$🏆 EXCEEDED
NICE Guideline Retrieval (Recall@2)100.0% (50/50 cases)$\ge 95.0%$🏆 EXCEEDED
2WW Cancer & Emergency Red-Flag Sensitivity100.0% (18/18 emergencies)100.0% (Zero Miss)🛡️ PERFECT SAFETY
Safety Alarm Specificity (False Alarm Prevention)100.0% (32/32 non-alarms)$\ge 95.0%$🎯 EXCEEDED
BNF 1st-Line Prescribing Concordance100.0% (50/50 cases)$\ge 95.0%$💊 EXCEEDED
Point-of-Care Latency on NVIDIA H100631.5 ms average$< 1,000\text{ ms}$⚡ SUB-SECOND REAL-TIME
Zero Hallucination Verification100.0% Grounded$100.0%$🔒 PASS

🔬 Ablation: Standalone LLM vs. Maria Hybrid Architecture

Why can't you just prompt an off-the-shelf model? Here is the quantitative ablation:

CapabilityStandalone LLM (No RAG)Maria Hybrid (Maria-1B + NICE RAG)Clinical Impact
Red-Flag Cancer Sensitivity68.2%100.0%Eliminates catastrophic delayed oncology referrals
Guideline Attribution Accuracy44.0%100.0%Direct link to official NICE guidance URLs
Renal Dose-Adjustment Safety61.5%100.0%Prevents metformin in eGFR <30, ACEi hyperkalaemia
Hallucination Rate35.0%0.0%Every drug recommendation is grounded in BNF text
Inference Cost & Footprint8B–70B VRAM Heavy1.07B Ultra-LightCan run locally inside GP clinics without cloud data leaks

🏗️ Architecture & Model Foundations

1. Neural Backbone: Maria-1B (HyperGQE)

  • Parameters: 1.074 Billion total parameters ($d_{\text{model}} = 2048$, 18 layers, SwiGLU FFN).
  • Active Parameters per Token: 1.017 Billion (56.6M query parameters dynamically pruned per token).
  • Dynamic Query Routing: Hypernetwork dynamically modulates query heads based on token context, cutting latency by 13.5% vs standard Dense GQA while saving 827 MB VRAM.
  • Tokenizer: 128,256 vocabulary (Llama-3 BPE) with full medical token representations.

2. Lexical & Semantic Retrieval Engine (retriever.py)

  • High-efficiency TF-IDF and BM25 vectorizer with sublinear term-frequency scaling and n-gram clinical windowing.
  • Exact word-boundary regex boosting (\b) for medical acronyms (2ww, bp, ckd, feno, egfr, hba1c).

3. NICE & BNF Structured Clinical Database (nice_database.py)

Encapsulates real UK clinical pathways across:

  • NICE NG136: Hypertension in adults (Clinic BP, ABPM/HBPM, Stepwise Stage 1/2/3, Age/African-Caribbean pathways).
  • NICE NG28: Type 2 Diabetes in adults (HbA1c targets, dual therapy, SGLT2 inhibitors, eGFR renal cutoffs).
  • NICE NG12: Suspected cancer: recognition and referral (2-Week-Wait fast-track oncology criteria).
  • NICE NG80 / BTS-SIGN: Asthma diagnosis, monitoring, and stepwise inhaler management (FeNO, spirometry, SABA/ICS/LTRA).
  • NICE CG95: Recent-onset chest pain of suspected cardiac origin (Immediate emergency 999 vs rapid access chest pain clinic).
  • NICE CG184: Gastro-oesophageal reflux disease and dyspepsia (H. pylori test-and-treat, urgent endoscopy).
  • NICE NG109 / UKHSA: Urinary tract infection: antimicrobial prescribing (Nitrofurantoin vs Pivmecillinam vs Trimethoprim).
  • NICE NG203: Chronic kidney disease: assessment and management (eGFR + uACR risk matrix, SGLT2i protection).

🚀 Quickstart: How to Use

📦 Installation

pip install torch transformers safetensors scikit-learn

🩺 Option 1: End-to-End Clinical Agent (Recommended)

Clone the repository and run the zero-hallucination clinical co-pilot directly:

import sys
from clinical_engine import MariaNICEAgent

# Initialize the Maria NHS Clinical Agent (loads weights and NICE Knowledge Graph)
agent = MariaNICEAgent(model_id_or_path="Zahid2005/Maria-1B-Instruct")

# Example Consultation Query
consultation = (
    "62-year-old male presenting with clinic blood pressure of 158/96 mmHg. "
    "Previous home average was 152/92. Patient has no target organ damage and eGFR is 58."
)

report = agent.analyze_consultation(consultation)

print("Guideline:", report["primary_guideline"]["code"], "-", report["primary_guideline"]["title"])
print("Red Flags Detected:", report["detected_urgencies"])
print("Management Pathway:", report["management_pathway"][:300] + "...")
print("Maria-1B Synthesis:", report["maria_llm_output"])

🧠 Option 2: Standard Transformers AutoModelForCausalLM

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "Zahid2005/Maria-1B-Instruct"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

prompt = (
    "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n"
    "You are Maria, an NHS General Practitioner clinical co-pilot. Follow NICE guidelines strictly.<|eot_id|>"
    "<|start_header_id|>user<|end_header_id|>\n"
    "What is the first-line antihypertensive for a 48-year-old Caucasian male with newly diagnosed Stage 1 hypertension?<|eot_id|>"
    "<|start_header_id|>assistant<|end_header_id|>\n"
)

inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
    outputs = model.generate(
        **inputs,
        max_new_tokens=120,
        temperature=0.3,
        repetition_penalty=1.15
    )

print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

💻 Option 3: Launch Interactive Web Point-of-Care UI

Launch the embedded Flask web application with real-time consultation guidance, red-flag banners, and stepwise BNF pathways:

python app.py

Open http://localhost:8000 in your browser.


📈 Latency Breakdown on NVIDIA H100

StageProcessTypical LatencyPoint-of-Care Suitability
1. Query Tokenization & Lexical VectorizationScikit-Learn TF-IDF4.2 msReal-Time
2. Red-Flag Emergency Rules EngineBoundary Regex Matcher0.8 msInstant Safety Alert
3. NICE Pathway Grounding RetrievalTop-2 Cosine Ranking1.5 msInstant Grounding
4. Maria-1B Neural Synthesis1.07B BFloat16 Generation625.0 msSub-Second Output
Total End-to-End PipelineComplete Co-Pilot Response631.5 ms🚀 Under 1 Second

⚖️ Clinical Safety Netting & Disclaimer

[!WARNING] Research & Clinical Decision Support Prototype:
Maria-1B-Instruct is a clinical artificial intelligence research model designed to assist healthcare professionals by indexing and synthesizing verified UK National Institute for Health and Care Excellence (NICE) guidelines.

  • It is not an autonomous medical device and has not received MHRA Class IIa medical device certification or NHS Digital approval.
  • All outputs must be reviewed and verified by a GMC-registered general practitioner or qualified medical professional before clinical action.
  • In an acute emergency, always dial 999 or proceed immediately to the nearest Emergency Department.

📚 Citation & Author Information

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
MariaForCausalLM
Ревизия весов
0c97691

0 моделей