Downloads · 30 days
3
12% of all-time downloads
yayamomt/medgemma-4b-it-sft-lora-opentrons
medgemma-4b-it-sft-lora-opentrons is a text generation model from yayamomt. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as other.
This is a LoRA adapter for unsloth/medgemma-4b-it-bnb-4bit. It was fine-tuned using text-only English-language Opentrons OT-2 protocol descriptions to produce machine-readable JSON containing the protocol title, categ…
Downloads · 30 days
3
12% of all-time downloads
All-time downloads
25
Public
Repo size
192 MB
Likes
0
Public
Click a slice to open those files.
.safetensors154 MB · 80%
From the Hugging Face model README
This is a LoRA adapter for unsloth/medgemma-4b-it-bnb-4bit. It was fine-tuned
using text-only English-language Opentrons OT-2 protocol descriptions to
produce machine-readable JSON containing the protocol title, categories,
labware, pipettes, modules, and reagents. It extracts protocol metadata; it
does not generate executable robot code.
This model is a fine-tuned version of unsloth/medgemma-4b-it-bnb-4bit. It has been trained using TRL.
Model documentation: MedGemma
Base model: unsloth/medgemma-4b-it-bnb-4bit
Github repo: yahyamomtaz/Meddemma-opentrons-fine-tuning
Data Source: Opentrons Protocol Library.
Research and assistive use only. This adapter does not generate, validate, or approve executable robot protocols. Every output must be reviewed by a qualified laboratory professional and validated in the Opentrons Protocol Designer / simulation environment before use.
Use this model as a draft metadata-extraction assistant for natural-language protocol descriptions, for example inventory planning, protocol-library search, or human-in-the-loop annotation.
It is not intended for clinical decision-making, diagnostic use, autonomous liquid handling, safety-critical lab operations, or use where an incorrect labware, reagent, module, or pipette selection could cause harm.
Input: a natural-language Opentrons protocol description.
Output: one JSON object, without explanatory text or Markdown fences:
{
"title": "string",
"categories": ["string"],
"labware": ["string"],
"pipettes": ["string"],
"modules": ["string"],
"reagents": ["string"]
}
The strings are model predictions, not a validated controlled vocabulary. They may be generic, duplicated, omitted, or unsupported by the input.
| Setting | Value |
|---|---|
| Base model | unsloth/medgemma-4b-it-bnb-4bit |
| LoRA rank / alpha / dropout | 16 / 32 / 0.05 |
| Epochs | 3 |
| Optimizer | Paged AdamW 8-bit |
| Learning rate | 1e-4 |
| Batch size / gradient accumulation | 2 / 4 |
| Maximum sequence length | 2048 |
| Hardware | NVIDIA H100 |
The final checkpoint at step 246 was also the selected best checkpoint, with
eval_loss=0.35. The completed run reported train_loss=0.40. These loss
values are optimization diagnostics, not task-quality or safety metrics.
The model was evaluated on all 164 source-disjoint records in data/eval.jsonl.
| Field | Precision | Recall | F1 |
|---|---|---|---|
| Categories | 0.79 | 0.78 | 0.79 |
| Labware | 0.35 | 0.32 | 0.34 |
| Pipettes | 0.65 | 0.70 | 0.67 |
| Modules | 0.67 | 0.80 | 0.73 |
| Reagents | 0.42 | 0.18 | 0.25 |
{
"title": "GNA Octea Prep",
"categories": [
"Sample Prep"
],
"labware": [
"Opentrons 96 Tip Rack 300 µL",
"Opentrons 96 Tip Rack 1000 µL",
"Opentrons 24 Tube Rack with Eppendorf 1.5 mL Safe-Lock Snapcap",
"Opentrons 96 Filter Tip Rack 20 µL",
"Opentrons 96 Well Aluminum Block with Generic PCR Strip 200 µL",
"Opentrons 24 Well Aluminum Block with NEST 1.5 mL Snapcap",
"Opentrons 6 Tube Rack with Falcon 50 mL Conical"
],
"pipettes": [
"P300 8-Channel Pipette (GEN2)",
"P300 Single Channel Pipette (GEN2)"
],
"modules": [
"Magnetic Module",
"Magnetic Module GEN2",
"Temperature Module",
"Temperature Module GEN2"
],
"reagents": []
}
This adapter is a derivative of MedGemma. Its use and redistribution are governed by the applicable Health AI Developer Foundations terms. Do not replace this notice with a permissive license unless you have confirmed that doing so is compatible with the base-model terms and the data provenance.
The underlying data derive from Opentrons protocol-library and catalog artifacts. Verify the exact upstream revision and redistribution rights before publishing the dataset or its enriched fields.
The model has been trained using TRL.
@misc{vonwerra2022trl,
title = {{TRL: Transformer Reinforcement Learning}},
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
year = 2020,
journal = {GitHub repository},
publisher = {GitHub},
howpublished = {\url{https://github.com/huggingface/trl}}
}