Instructions to use ZeroSaturn/gemma4-e2b-cannabis-strain-expert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZeroSaturn/gemma4-e2b-cannabis-strain-expert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ZeroSaturn/gemma4-e2b-cannabis-strain-expert") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ZeroSaturn/gemma4-e2b-cannabis-strain-expert") model = AutoModelForCausalLM.from_pretrained("ZeroSaturn/gemma4-e2b-cannabis-strain-expert") 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]:])) - PEFT
How to use ZeroSaturn/gemma4-e2b-cannabis-strain-expert with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ZeroSaturn/gemma4-e2b-cannabis-strain-expert with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ZeroSaturn/gemma4-e2b-cannabis-strain-expert" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZeroSaturn/gemma4-e2b-cannabis-strain-expert", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ZeroSaturn/gemma4-e2b-cannabis-strain-expert
- SGLang
How to use ZeroSaturn/gemma4-e2b-cannabis-strain-expert 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 "ZeroSaturn/gemma4-e2b-cannabis-strain-expert" \ --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": "ZeroSaturn/gemma4-e2b-cannabis-strain-expert", "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 "ZeroSaturn/gemma4-e2b-cannabis-strain-expert" \ --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": "ZeroSaturn/gemma4-e2b-cannabis-strain-expert", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ZeroSaturn/gemma4-e2b-cannabis-strain-expert with Docker Model Runner:
docker model run hf.co/ZeroSaturn/gemma4-e2b-cannabis-strain-expert
Gemma 4 E2B Cannabis Strain Expert
Merged Gemma 4 E2B text-only model fine-tuned with QLoRA for professional cannabis strain knowledge.
Intended Use
This model is tuned to answer questions about cannabis strain profiles, reported effects, flavors/aromas, terpene signals, cannabinoid signals, lineage, and grow notes.
It should not be used as a source of medical, legal, or safety-critical advice. The training data is based on crowdsourced strain records, so outputs should be treated as consumer-reported tendencies rather than clinical evidence.
Training Data
Generated instruction data from Hormold/leafly-full-dump-cannabis:
- 24,136 training examples
- 400 evaluation examples
- Fields used: strain names, categories, descriptions, reported effects, flavors, terpenes, cannabinoids, ratings, lineage, grow fields, symptom/condition aggregates, and negative-effect signals.
Recommended System Prompt
You are a rigorous cannabis strain specialist. Give professional, evidence-aware, consumer-safe answers about strain taxonomy, reported effects, aromas, terpenes, cannabinoids, lineage, and practical selection. Do not present crowdsourced strain reports as medical proof, do not give medical or legal advice, and mention uncertainty when data is sparse.
Prompt Format
This model was trained with this lightweight chat format:
<system>
You are a rigorous cannabis strain specialist. Give professional, evidence-aware, consumer-safe answers about strain taxonomy, reported effects, aromas, terpenes, cannabinoids, lineage, and practical selection. Do not present crowdsourced strain reports as medical proof, do not give medical or legal advice, and mention uncertainty when data is sparse.
</system>
<user>
Give me an expert strain profile for Blue Dream.
</user>
<assistant>
Example
from transformers import AutoTokenizer, AutoModelForCausalLM
repo_id = "ZeroSaturn/gemma4-e2b-cannabis-strain-expert"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id, device_map="auto", torch_dtype="auto")
messages = [
{"role": "system", "content": 'You are a rigorous cannabis strain specialist. Give professional, evidence-aware, consumer-safe answers about strain taxonomy, reported effects, aromas, terpenes, cannabinoids, lineage, and practical selection. Do not present crowdsourced strain reports as medical proof, do not give medical or legal advice, and mention uncertainty when data is sparse.'},
{"role": "user", "content": "Compare Blue Dream and Granddaddy Purple for reported effects and aroma."},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=500, temperature=0.7, top_p=0.9)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Training Setup
- Base model:
principled-intelligence/gemma-4-E2B-it-text-only - Adapter source:
outputs/gemma4-e2b-cannabis-qlora - Method: QLoRA / LoRA
- LoRA rank: 16
- Trainable params: about 24.2M
- Max sequence length: 2048
- Steps: 700
Safety Notes
Cannabis laws vary by jurisdiction. Effects vary by person, dose, route, tolerance, and batch chemistry. This model should qualify strain claims and recommend checking current lab results when precision matters.
- Downloads last month
- 15