Instructions to use M37labsorg/ade-extract-3b-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use M37labsorg/ade-extract-3b-v1 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("M37labsorg/ade-extract-3b-v1") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use M37labsorg/ade-extract-3b-v1 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf M37labsorg/ade-extract-3b-v1:Q4_K_M # Run inference directly in the terminal: llama cli -hf M37labsorg/ade-extract-3b-v1:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf M37labsorg/ade-extract-3b-v1:Q4_K_M # Run inference directly in the terminal: llama cli -hf M37labsorg/ade-extract-3b-v1:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf M37labsorg/ade-extract-3b-v1:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf M37labsorg/ade-extract-3b-v1:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf M37labsorg/ade-extract-3b-v1:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf M37labsorg/ade-extract-3b-v1:Q4_K_M
Use Docker
docker model run hf.co/M37labsorg/ade-extract-3b-v1:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use M37labsorg/ade-extract-3b-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "M37labsorg/ade-extract-3b-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "M37labsorg/ade-extract-3b-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/M37labsorg/ade-extract-3b-v1:Q4_K_M
- Ollama
How to use M37labsorg/ade-extract-3b-v1 with Ollama:
ollama run hf.co/M37labsorg/ade-extract-3b-v1:Q4_K_M
- Unsloth Desktop
- Pi
How to use M37labsorg/ade-extract-3b-v1 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "M37labsorg/ade-extract-3b-v1"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "M37labsorg/ade-extract-3b-v1" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use M37labsorg/ade-extract-3b-v1 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "M37labsorg/ade-extract-3b-v1"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "M37labsorg/ade-extract-3b-v1" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "M37labsorg/ade-extract-3b-v1", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use M37labsorg/ade-extract-3b-v1 with Docker Model Runner:
docker model run hf.co/M37labsorg/ade-extract-3b-v1:Q4_K_M
- Lemonade
How to use M37labsorg/ade-extract-3b-v1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull M37labsorg/ade-extract-3b-v1:Q4_K_M
Run and chat with the model
lemonade run user.ade-extract-3b-v1-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use M37labsorg/ade-extract-3b-v1 with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "M37labsorg/ade-extract-3b-v1"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default M37labsorg/ade-extract-3b-v1
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use M37labsorg/ade-extract-3b-v1 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "M37labsorg/ade-extract-3b-v1"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "M37labsorg/ade-extract-3b-v1" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf M37labsorg/ade-extract-3b-v1:Q4_K_M# Run inference directly in the terminal:
llama cli -hf M37labsorg/ade-extract-3b-v1:Q4_K_MUse pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf M37labsorg/ade-extract-3b-v1:Q4_K_M# Run inference directly in the terminal:
./llama-cli -hf M37labsorg/ade-extract-3b-v1:Q4_K_MBuild from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf M37labsorg/ade-extract-3b-v1:Q4_K_M# Run inference directly in the terminal:
./build/bin/llama-cli -hf M37labsorg/ade-extract-3b-v1:Q4_K_MUse Docker
docker model run hf.co/M37labsorg/ade-extract-3b-v1:Q4_K_Made-extract-3b-v1
Published by M37 Labs (M37labsorg), the organisation of Hugging Face user engagepy, who maintains it. Built with SLM Forge.
Fine-tuned locally with SLM Forge on 2026-09-25.
Goal: Rebuild ADE Extract as a consistent JSON-only information extractor: report only facts explicitly stated in the text, use null for missing optional details, and return an empty events list when no adverse effect is stated. Train a clean adapter from the original base; treat the result as an experimental extraction aid, not medical advice, and do not claim commercial clearance for the ADE Corpus v2 data unless its license is verified.
Base model: mlx-community/Qwen2.5-3B-Instruct-4bit
Runs on: Apple Silicon Macs with 8 GB unified memory or more.
Lineage
- SFT (job 50): train_loss 0.018, peak_mem_gb 7.15, val_loss_start 0.875, val_loss 0.025
Usage
pip install mlx-lm
mlx_lm.generate --model M37labsorg/ade-extract-3b-v1 --prompt "Hello"
Recommended sampling
{
"temperature": 0.7,
"top_p": 0.95
}
System prompt
Extract only what the text explicitly states. Return only valid JSON in exactly this shape: {"events":[{"drug":null,"adverse_effect":"...","evidence_span":"...","severity":null,"dosage":null,"action_taken":null}]}. Include one event per explicitly described adverse effect. Fill drug, adverse_effect, severity, dosage, and action_taken only when each is stated in the text; otherwise use JSON null. Do not infer a drug-event link from timing alone, or infer causality, severity, dosage, or actions. Quote the shortest exact, contiguous evidence span supporting the event. If no adverse effect is stated, return {"events":[]}. This is an extraction aid, not medical advice.
Run it anywhere (GGUF)
GGUF builds of this model, for llama.cpp, Ollama and LM Studio:
ade-extract-3b-v3-Q4_K_M.gguf(Q4_K_M, 1.80 GB)ade-extract-3b-v3-Q8_0.gguf(Q8_0, 3.06 GB)
llama-cli -m ade-extract-3b-v3-Q4_K_M.gguf -p "Hello" # llama.cpp
ollama run hf.co/M37labsorg/ade-extract-3b-v1:Q4_K_M # Ollama
In LM Studio, search for the repository or load the .gguf file.
Licence & attribution
This model is a fine-tune of mlx-community/Qwen2.5-3B-Instruct-4bit and is subject to its licence: Qwen Research licence (https://huggingface.co/Qwen/Qwen2.5-3B-Instruct/blob/main/LICENSE).
What it asks of you: Research and non-commercial use only; a commercial use needs a licence from Alibaba Cloud.
See LICENSE-BASE-MODEL.md, and the base model's own licence files where they could be included, in this folder.
Intended use & limitations
A small model fine-tuned for one narrow task on a few thousand examples. It makes mistakes, including confident ones. Check its outputs, and do not use it on its own for medical, legal, financial or safety-critical decisions.
- Downloads last month
- 74
4-bit
Install (macOS, Linux)
# Start a local OpenAI-compatible server with a web UI: llama serve -hf M37labsorg/ade-extract-3b-v1:Q4_K_M# Run inference directly in the terminal: llama cli -hf M37labsorg/ade-extract-3b-v1:Q4_K_M