Instructions to use jsoul/geo-perturbation-grouping-qwen3-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jsoul/geo-perturbation-grouping-qwen3-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jsoul/geo-perturbation-grouping-qwen3-4b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jsoul/geo-perturbation-grouping-qwen3-4b") model = AutoModelForCausalLM.from_pretrained("jsoul/geo-perturbation-grouping-qwen3-4b", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use jsoul/geo-perturbation-grouping-qwen3-4b 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 jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0 # Run inference directly in the terminal: llama cli -hf jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0 # Run inference directly in the terminal: llama cli -hf jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0
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 jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0
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 jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0
Use Docker
docker model run hf.co/jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0
- LM Studio
- Jan
- vLLM
How to use jsoul/geo-perturbation-grouping-qwen3-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jsoul/geo-perturbation-grouping-qwen3-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jsoul/geo-perturbation-grouping-qwen3-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0
- SGLang
How to use jsoul/geo-perturbation-grouping-qwen3-4b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "jsoul/geo-perturbation-grouping-qwen3-4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jsoul/geo-perturbation-grouping-qwen3-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "jsoul/geo-perturbation-grouping-qwen3-4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jsoul/geo-perturbation-grouping-qwen3-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use jsoul/geo-perturbation-grouping-qwen3-4b with Ollama:
ollama run hf.co/jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0
- Unsloth Desktop
- Pi
How to use jsoul/geo-perturbation-grouping-qwen3-4b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use jsoul/geo-perturbation-grouping-qwen3-4b with Docker Model Runner:
docker model run hf.co/jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0
- Lemonade
How to use jsoul/geo-perturbation-grouping-qwen3-4b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0
Run and chat with the model
lemonade run user.geo-perturbation-grouping-qwen3-4b-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use jsoul/geo-perturbation-grouping-qwen3-4b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0
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 jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use jsoul/geo-perturbation-grouping-qwen3-4b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0
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 "jsoul/geo-perturbation-grouping-qwen3-4b:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
GEO Gene-Perturbation Grouping — Qwen3-4B (merged)
A fine-tune of Qwen/Qwen3-4B-Instruct-2507
that reads the sample metadata of an NCBI GEO
gene-expression series and organizes its samples into valid genetic-perturbation
case/control experimental groups (methods KD / KO / OE, ≥2 controls and ≥2 cases,
single wild-type HGNC target gene, one cell line, matched time points), or reports
No valid groups found.
The LoRA adapter has been merged into the base weights, so this is a standalone model
(bfloat16, safetensors) usable directly with transformers, vLLM, TGI, etc.
Model details
| Base model | Qwen/Qwen3-4B-Instruct-2507 (Qwen3, 36 layers, hidden 2560, GQA 32/8 heads, 262k context) |
| Parameters | ~4B |
| Precision | bfloat16 |
| Format | merged full weights, safetensors (2 shards, ~8 GB) |
| Architecture | Qwen3ForCausalLM |
Training
| Method | LoRA (merged), via Unsloth 2025.8.5 (transformers 4.55.1) |
| LoRA rank / alpha | 32 / 32 |
| Learning rate | 2e-4 |
| Epochs | 3 |
| Seed | 3407 |
| Training data | jsoul/geo-perturbation-grouping-train — train split only (2,400 examples) |
The companion validation split (600 examples) and the held-out
jsoul/geo-perturbation-grouping-test
set (300 examples) were not used for training. GEO accessions are disjoint across
train / validation / test, so the test set is a clean leakage-free benchmark.
Prompt format
The model was trained on single-turn chats: a fixed system rulebook, a user message
containing the study metadata, and an assistant target. For best results, use the exact
system prompt from the training dataset (ds["train"][0]["messages"][0]["content"]) and
supply the study metadata as the user turn.
Target output format:
Group <n>:
Cell line: <cell line>
Perturbation method: <KD | KO | OE>
Target gene: <HGNC symbol>
Control: <comma-separated GSM IDs>
Case: <comma-separated GSM IDs>
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "jsoul/geo-perturbation-grouping-qwen3-4b" # private; requires a token
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
system = "<the fixed rulebook — see the training dataset's messages[0]>"
user = "<GEO study title/summary/design + the per-sample GSM table>"
messages = [{"role": "system", "content": system},
{"role": "user", "content": user}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=1024, do_sample=False)
print(tok.decode(out[0, inputs.shape[1]:], skip_special_tokens=True))
Greedy decoding (do_sample=False) is recommended for this structured extraction task; the
packaged generation_config.json otherwise defaults to sampling (temperature=0.7,
top_p=0.8, top_k=20), inherited from the base model.
Intended use & limitations
- Intended: curation assistance for identifying perturbation case/control groups from GEO transcriptomic studies (RNA-seq / microarray). Outputs should be reviewed by a human.
- Out of scope: non-transcriptomic assays, non-human samples, multi-gene or mutant constructs, and drug/stimulus-confounded designs — the rulebook instructs the model to skip these, but errors are possible.
- Limitations: may hallucinate GSM IDs or gene symbols, mis-assign controls, or mishandle very long sample tables. Always validate GSM membership and HGNC symbols against the source GEO record before use.
License
Inherits the base model's license (Apache 2.0, from Qwen/Qwen3-4B-Instruct-2507).
Training data derives from public NCBI GEO metadata; see the dataset cards for provenance.
Citation
Please cite this repository, the base model (Qwen/Qwen3-4B-Instruct-2507), and acknowledge
NCBI GEO as the metadata source.
- Downloads last month
- 234
Model tree for jsoul/geo-perturbation-grouping-qwen3-4b
Base model
Qwen/Qwen3-4B-Instruct-2507