> For the complete documentation index, see [llms.txt](https://meddroid.gitbook.io/meddroid-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://meddroid.gitbook.io/meddroid-docs/developers/model-studio.md). Agents can also search and read this documentation through its [MCP server](https://meddroid.gitbook.io/meddroid-docs/~gitbook/mcp).

# Model Studio & SDK

Model Studio is a guided page for providers and developers: fine-tune a medical model, build a searchable knowledge base (RAG) from your files, and list it on the MedDroid Marketplace.

## Open Model Studio

1. Go to [medicalandroid.com/#/model-studio](https://medicalandroid.com/#/model-studio).
2. Use the four cards to jump to a section: **Choose a base model**, **Train your model**, **Build a RAG** and **Publish to Marketplace**.
3. Tap **Sign up as a developer** if you want a free developer account.

{% hint style="info" %}
Good to know: your data, your model files and the training all stay on your own machine or your own Kaggle account. MedDroid stores only the link, the model card and your brand, never your weights.
{% endhint %}

## Choose a base model

1. Scroll to **Choose a base model**.
2. Tap a model. The commands further down the page change to match it.

| Base model    | Size                    | From             | Memory for training |
| ------------- | ----------------------- | ---------------- | ------------------- |
| MedGemma 4B   | 4B · text + image       | Google Health AI | about 10 GB         |
| OpenBioLLM 8B | 8B · Llama-3            | Saama            | about 12 GB         |
| Meditron 7B   | 7B · clinical           | EPFL             | about 10 GB         |
| Phi-3-mini    | 3.8B · lightweight      | Microsoft        | about 6 GB          |
| MedDroid-v9   | 4B · MedGemma fine-tune | MedDroid Labs    | about 10 GB         |

Good to know: each base model keeps its own licence. Read it before commercial use.

## Train your model

1. Scroll to **Train your model**.
2. Pick **Kaggle · free GPU** or **Your desktop GPU**.
3. Follow the numbered steps on the page. Each command box has a **Copy** button.

| Track                 | What the steps cover                                                                                                                                                   |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Kaggle · free GPU** | Create a Kaggle notebook with a GPU, install the tooling, bring your data as JSONL (or use the sample dataset), fine-tune, push the model to get a link, then publish. |
| **Your desktop GPU**  | Pick your hardware (**≤ 6 GB VRAM**, **8–12 GB VRAM**, **16 GB+ VRAM**), set up your machine, point to your data, fine-tune, run it on your own GPU, then publish.     |

{% hint style="info" %}
Good to know: training on a computer with no GPU is not practical. Pick **CPU / RAM only** and the page sends you to the Kaggle track. Use only de-identified records as training data.
{% endhint %}

## Build a RAG from your files

1. Scroll to **Build a RAG from your files**. No training is needed.
2. Gather your files (`.txt`, `.md`, `.csv` or `.json`), or download one of the sample sets on the page.
3. Build the index, test it with a question, then publish it read-only.

```bash
pip install "meddroid-sdk[rag]"
python -m meddroid.cli rag build ./my-files --out ./my-rag
python -m meddroid.cli rag query ./my-rag "What is the sepsis bundle timeline?"
```

## Publish to the Marketplace

1. Upload your model or RAG files to Hugging Face, Kaggle or Drive and copy the link.
2. Scroll to **Publish to the Marketplace** and choose **Model** or **RAG**.
3. Fill in **Brand / company name**, **Your email**, the name, **One-line description** and **Files link**.
4. Under **Publish as**, choose **Free**, **Paid** or **Private**.
5. Check the **Marketplace preview**, then tap **Submit for review**.

| Publish as  | What it means                                                                                                                                 |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **Free**    | Listed on the Marketplace. Anyone can download.                                                                                               |
| **Paid**    | You set a **Price (USD)** and an **ERC-20 payout wallet**. Buyers pay your wallet. The files link stays hidden until the payment is verified. |
| **Private** | Invite-only. It does not appear publicly.                                                                                                     |

Good to know: after you submit you see **Pending review**. A person reviews each listing before it shows, and MedDroid emails you when it is approved.

## The MedDroid SDK (Python)

The same jobs are available from the command line with the `meddroid-sdk` package on PyPI.

```bash
pip install meddroid-sdk
python -m meddroid.cli login
```

| Command                                 | What it does                                                                                              |
| --------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `login`                                 | Saves your provider API token.                                                                            |
| `train`                                 | Fine-tunes a medical base model (QLoRA). Options: `--base`, `--data`, `--out`, `--epochs`.                |
| `rag build` · `rag query` · `rag serve` | Builds a RAG index from a folder, asks it one question, or keeps it loaded to answer many questions fast. |
| `serve`                                 | Runs a local inference server for your model.                                                             |
| `submit`                                | Sends a model or RAG link to the Marketplace for review. Needs `--name`, `--brand` and `--link`.          |
| `app init` · `app check` · `app submit` | Starts, checks and submits a free Marketplace app.                                                        |

Good to know:

* Training, serving and RAG need extra parts: `pip install "meddroid-sdk[train,serve,rag]"`.
* The page writes commands as `python -m meddroid.cli …` so they work on any computer. The short form `meddroid …` works once the Python **Scripts** folder is on your PATH.
* Some command boxes on the page pin an older version number (`meddroid-sdk==0.1.3`). `pip install meddroid-sdk` gets the newest one.

{% hint style="warning" %}
Models and RAGs built here are tools for learning and support. They are not validated medical devices, and their answers are information, not a diagnosis.
{% endhint %}
