Downloads · 30 days
19
13% of all-time downloads
MrEngineer/ClinIQ-Edge-gemma-4-e4b-it
ClinIQ-Edge-gemma-4-e4b-it is a machine learning model from MrEngineer. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
ClinIQ Edge is a highly optimized, state-of-the-art medical language model fine-tuned from the Google Gemma 4 E4B base model. This repository contains the complete pipeline used to train the model, specifically engine…
Downloads · 30 days
19
13% of all-time downloads
All-time downloads
146
Public
Repo size
6.3 GB
Likes
1
Public
Click a slice to open those files.
.gguf6.3 GB · 100%
From the Hugging Face model README
ClinIQ Edge is a highly optimized, state-of-the-art medical language model fine-tuned from the Google Gemma 4 E4B base model. This repository contains the complete pipeline used to train the model, specifically engineered to maximize cost-efficiency and bypass infrastructure bottlenecks by splitting the workflow across Lightning.ai and Modal.
google/gemma-4-e4b-it (Multimodal, 6B parameters)Q4_K_M) for local inference via OllamaTo train a model of this scale cost-effectively, we separated the pipeline into two distinct phases. This allowed us to leverage free CPU resources for network-heavy data processing, reserving expensive GPU time strictly for compute.
To conserve funds, we utilized the free Lightning.ai (10 free credits) CPU studio for Phase 1 (phase1_download.py).
cliniq-edge-volume). This completely eliminated network dependency and download times for the subsequent GPU phase.For the actual fine-tuning, we deployed the training script (phase2_train.py wrapped in train_modal.py) to Modal.com, provisioning a high-end NVIDIA RTX PRO 6000 (Blackwell Server Edition) GPU.
cliniq-edge-volume, the script bypassed all network overhead and loaded data directly from disk.Gemma4ClippableLinear target modules) and processor positional argument mapping bugs.The model was rigorously evaluated immediately after training completed.
0.1623While USMLE is an extremely challenging benchmark (random guessing is 25%), the model demonstrated a strong reduction in training loss and successfully internalized the formatting and structure of complex clinical vignettes.
The final output of the pipeline is a highly compressed Q4_K_M GGUF file. The model weights and a custom Modelfile have been automatically generated.
To run ClinIQ Edge locally on your laptop:
cliniq-edge/output/ directory containing the GGUF files.ollama create cliniq-edge -f output/Modelfile
ollama run cliniq-edge
phase1_download.py — Pipeline script for downloading Hugging Face models and datasets on CPU environments.phase2_train.py — Core Unsloth QLoRA training script with custom MedQA evaluation and checkpoint resumption logic.train_modal.py — Modal deployment wrapper that containerizes Phase 2, injects dependencies (including llama.cpp requirements), and orchestrates the GPU volume mounts.