RetiJev

RetiJev is a family of small decision models for ophthalmology. Each model takes a free-text description of a patient and a set of closed-form clinical questions, and returns a probability for every predefined answer option. It does not generate text. The case is encoded once and all of its questions are scored from that encoding.

RetiJev answers three kinds of questions:

  • Decision. Next investigation, management direction, urgency, referral, and whether a proposed plan is safe.
  • Diagnosis. Likelihood of each candidate diagnosis, and the leading diagnosis among candidates.
  • Grading. Grades under published clinical grading systems, for example ICDR diabetic retinopathy, Beckman AMD, ETROP, the clinical activity score for thyroid eye disease and WHO visual impairment categories.

Code, data format and training recipe: https://github.com/Awenbocc/RetiJev

Models

Subfolder Base model --run
0.8B/ Qwen/Qwen3.5-0.8B-Base BoKelvin/RetiJev/0.8B
2B/ Qwen/Qwen3.5-2B-Base BoKelvin/RetiJev/2B
9B/ Qwen/Qwen3.5-9B-Base BoKelvin/RetiJev/9B

Each subfolder contains:

  • adapter_model.safetensors and adapter_config.json: the LoRA adapter (rank 64)
  • head.pt: the pointer head that scores the answer options, plus the model metadata
  • the tokenizer files

The base model is not included. It is downloaded from Hugging Face on first use.

Usage

git clone https://github.com/Awenbocc/RetiJev.git && cd RetiJev
pip install -r requirements.txt
python -m retijev.demo --run BoKelvin/RetiJev/0.8B --input examples/next_investigation.json

A request is a JSON object with two fields:

  • state: the case text
  • questions: one entry per question, each with three fields:
    • type: noul for yes/no, choice for one of several named options, score for an ordered level
    • instructions: the question text
    • criteria: the answer options

See the GitHub README for the full format and for batch prediction on a labelled dataset.

Intended use and limitations

RetiJev is for research only. It is not a medical device and has not been validated for clinical use.

  • Decision and diagnosis labels in the training data were produced and cross-checked by LLMs. Ophthalmologists did not review them case by case.
  • Grading labels are computed by code from the published grading rules.
  • The training cases are synthetic. Behaviour on real clinical notes may differ.
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for BoKelvin/RetiJev

Adapter
(61)
this model