Instructions to use oxalis-ink/shamrock-0-e4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use oxalis-ink/shamrock-0-e4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="oxalis-ink/shamrock-0-e4b") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("oxalis-ink/shamrock-0-e4b") model = AutoModelForMultimodalLM.from_pretrained("oxalis-ink/shamrock-0-e4b", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use oxalis-ink/shamrock-0-e4b 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 oxalis-ink/shamrock-0-e4b:Q4_K_M # Run inference directly in the terminal: llama cli -hf oxalis-ink/shamrock-0-e4b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf oxalis-ink/shamrock-0-e4b:Q4_K_M # Run inference directly in the terminal: llama cli -hf oxalis-ink/shamrock-0-e4b:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf oxalis-ink/shamrock-0-e4b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf oxalis-ink/shamrock-0-e4b:Q4_K_M
Use Docker
docker model run hf.co/oxalis-ink/shamrock-0-e4b:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use oxalis-ink/shamrock-0-e4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "oxalis-ink/shamrock-0-e4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "oxalis-ink/shamrock-0-e4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/oxalis-ink/shamrock-0-e4b:Q4_K_M
- SGLang
How to use oxalis-ink/shamrock-0-e4b 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 "oxalis-ink/shamrock-0-e4b" \ --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": "oxalis-ink/shamrock-0-e4b", "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 "oxalis-ink/shamrock-0-e4b" \ --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": "oxalis-ink/shamrock-0-e4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use oxalis-ink/shamrock-0-e4b with Ollama:
ollama run hf.co/oxalis-ink/shamrock-0-e4b:Q4_K_M
- Unsloth Desktop
- Pi
How to use oxalis-ink/shamrock-0-e4b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf oxalis-ink/shamrock-0-e4b:Q4_K_M
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": "oxalis-ink/shamrock-0-e4b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use oxalis-ink/shamrock-0-e4b with Docker Model Runner:
docker model run hf.co/oxalis-ink/shamrock-0-e4b:Q4_K_M
- Lemonade
How to use oxalis-ink/shamrock-0-e4b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull oxalis-ink/shamrock-0-e4b:Q4_K_M
Run and chat with the model
lemonade run user.shamrock-0-e4b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use oxalis-ink/shamrock-0-e4b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf oxalis-ink/shamrock-0-e4b:Q4_K_M
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 oxalis-ink/shamrock-0-e4b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use oxalis-ink/shamrock-0-e4b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf oxalis-ink/shamrock-0-e4b:Q4_K_M
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 "oxalis-ink/shamrock-0-e4b:Q4_K_M" \ --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"
shamrock-0-e4b
Gemma 4 E4B fine-tuned for the Oxalis desktop app's
language-learning surfaces (camera translate, text translate, tutor, talk,
dictionary) across Japanese, Korean, and Simplified Chinese. The E4B sibling
of oxalis-ink/shamrock-0-e2b.
Human Note
As a fair warning... this fine-tune will perform poorly outside of the Oxalis app. Feel free to run it for funzies though :)
Layout
| Path | Contents |
|---|---|
| repo root | Merged fp16 checkpoint |
gguf/ |
shamrock-0-e4b-q4_k_m.gguf + mmproj-shamrock-0-e4b-f16.gguf, what the app's llama.cpp runtime loads |
MTP/ |
Multi-token-prediction drafter for speculative decoding: mtp-shamrock-0-e4b-Q8_0.gguf (llama.cpp, serve with --spec-type draft-mtp) and the same head in HF format under MTP/assistant/ |
License
shamrock-0-e4b is licensed under CC BY-NC 4.0 (see LICENSE). You can use, share and adapt it for non-commercial purposes, including personal projects and research, as long as you give credit. Commercial use, such as selling the weights, serving them in a paid product or API, or bundling them into a commercial app, is not permitted. For commercial licensing, reach out via oxalis.ink.
When you share this model or anything built from it, credit it as:
shamrock-0-e4b by Oxalis (https://oxalis.ink), licensed under CC BY-NC 4.0
and say whether you changed it.
shamrock-0-e4b is a modified version of Gemma 4 E4B by Google DeepMind: its weights were fine-tuned and merged, then converted to GGUF with an added MTP drafter. Gemma 4 itself is licensed under the Apache License 2.0 (see LICENSE-GEMMA and the Gemma 4 license); the CC BY-NC 4.0 terms cover Oxalis's modifications. See NOTICE.
- Downloads last month
- 1,435