Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
base_model:
|
| 6 |
+
- google/medgemma-1.5-4b-it
|
| 7 |
+
pipeline_tag: question-answering
|
| 8 |
+
tags:
|
| 9 |
+
- medical
|
| 10 |
+
- agent
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
# VAJRAM Edge & Cloud Models: Clinical Decision Support Toolkit
|
| 15 |
+
|
| 16 |
+
This repository contains the highly optimized `.gguf` weights, vision projectors, and LoRA adapters powering **Project VAJRAM**, an agentic Clinical Decision Support System (CDSS) for Multiple Myeloma.
|
| 17 |
+
|
| 18 |
+
These models are heavily quantized and formatted to run entirely offline on cpu, hf spaces and even on android phones (via `llama.rn`) utilizing a LangGraph-driven Mixture of Adapters (MoA) architecture.
|
| 19 |
+
|
| 20 |
+
## 馃摝 Repository Contents (The MoA Arsenal)
|
| 21 |
+
|
| 22 |
+
This is a modular toolkit. Rather than running one massive monolithic model, VAJRAM utilizes a fast base model and hot-swaps lightweight LoRA adapters into memory depending on the clinical task.
|
| 23 |
+
|
| 24 |
+
### 1. Base Models & Vision
|
| 25 |
+
* **`medgemma_q4km.gguf` (2.49 GB):** The core foundational medical reasoning engine. Quantized to `Q4_K_M` to perfectly balance speed, RAM footprint, and preservation of the 256k Gemma medical vocabulary. Fits comfortably in <4GB RAM.
|
| 26 |
+
* **`medgemma_vision_base.gguf`:** The vision-aligned base model for multi-modal tasks.
|
| 27 |
+
* **`medgemma_Bone_marrow_vision.gguf` :** The Llava-style Multimodal Projector (`mmproj`). This converts clinical WSI (Whole Slide Image) patch pixels into embeddings the LLM can understand.
|
| 28 |
+
|
| 29 |
+
### 2. The Clinical LoRA Adapters
|
| 30 |
+
These are lightweight (<120MB), hot-swappable domain experts trained for specific LangGraph agent nodes:
|
| 31 |
+
* **`lora_module2.gguf`:** Clinical Agent Node 2.
|
| 32 |
+
* **`lora_module3.gguf`:** Clinical Agent Node 3.
|
| 33 |
+
* **`lora_module4.gguf`:** Clinical Agent Node 4.
|
| 34 |
+
|
| 35 |
+
### 3. Build Artifacts
|
| 36 |
+
* **`llama_cpp_python-0.3.16-cp310-cp310-linux_x86_64.whl` (4.75 MB):** A custom, pre-compiled Python wheel with OpenBLAS hardware acceleration baked in. Used to bypass strict compilation timeouts when deploying the VAJRAM orchestrator to serverless environments like Hugging Face Spaces.
|
| 37 |
+
|
| 38 |
+
## 馃捇 Open Source Architecture & Code
|
| 39 |
+
The complete orchestrator codebase, including the LangGraph MoA setup, Python backend, and the native cpu and gpu based application, is fully open-source.
|
| 40 |
+
|
| 41 |
+
For all the codes and brief documentation:
|
| 42 |
+
馃憠 **[View Project VAJRAM on GitHub](https://github.com/shrishSVaidya/Project-VAJRAM)**
|
| 43 |
+
|
| 44 |
+
## 馃寪 Live Cloud Demo
|
| 45 |
+
Want to test the cloud-based MoA orchestrator without installing anything? The LangGraph Python backend is currently deployed as a live interactive web app.
|
| 46 |
+
|
| 47 |
+
馃憠 **[Test VAJRAM on Hugging Face Spaces](https://huggingface.co/spaces/shrishSVaidya/Projet_VAJRAM)**
|
| 48 |
+
*(Note: This demo is hosted on a free-tier CPU environment. Inference generation will be significantly slower than the native, hardware-accelerated Edge deployment).*
|
| 49 |
+
|
| 50 |
+
## 馃殌 Quick Start: Inference via CLI
|
| 51 |
+
|
| 52 |
+
To test the base model locally on your terminal using `llama.cpp`:
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
# Standard Text Inference
|
| 56 |
+
./llama-cli -m medgemma_q4km.gguf -p "User: What are the distinct morphological features of a myeloblast? \n\nAssistant:" -n 256 --temp 0.2
|
| 57 |
+
|
| 58 |
+
# Testing a LoRA Hot-Swap
|
| 59 |
+
./llama-cli -m medgemma_q4km.gguf --lora lora_module2.gguf -p "User: Analyze this patient protocol... \n\nAssistant:" -n 256
|
| 60 |
+
```
|