Instructions to use BoKelvin/RetiJev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use BoKelvin/RetiJev with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
|
Download README.md from BoKelvin/RetiJev: direct link, hf CLI and curl.
- Browser
- Download file 3.01 kB
-
https://huggingface.co/BoKelvin/RetiJev/resolve/main/README.md
- Command line
-
hf download hf://BoKelvin/RetiJev/README.md
-
curl -L -o README.md https://huggingface.co/BoKelvin/RetiJev/resolve/main/README.md
3.01 kB
| license: apache-2.0 | |
| base_model: | |
| - Qwen/Qwen3.5-0.8B-Base | |
| - Qwen/Qwen3.5-2B-Base | |
| - Qwen/Qwen3.5-9B-Base | |
| library_name: peft | |
| language: | |
| - en | |
| tags: | |
| - ophthalmology | |
| - medical | |
| - clinical-decision-support | |
| - lora | |
| # 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/`](https://huggingface.co/BoKelvin/RetiJev/tree/main/0.8B) | [Qwen/Qwen3.5-0.8B-Base](https://huggingface.co/Qwen/Qwen3.5-0.8B-Base) | `BoKelvin/RetiJev/0.8B` | | |
| | [`2B/`](https://huggingface.co/BoKelvin/RetiJev/tree/main/2B) | [Qwen/Qwen3.5-2B-Base](https://huggingface.co/Qwen/Qwen3.5-2B-Base) | `BoKelvin/RetiJev/2B` | | |
| | [`9B/`](https://huggingface.co/BoKelvin/RetiJev/tree/main/9B) | [Qwen/Qwen3.5-9B-Base](https://huggingface.co/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 | |
| ```bash | |
| 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. | |