Image-to-Text
PEFT
Safetensors
GGUF
LiteRT-LM
vision
object-detection
marine-debris
environmental-ai
unsloth
lora
gemma-4
edge-ai
on-device
mobile
Eval Results (legacy)
conversational
Instructions to use asferrer/gemma-4-E2B-it-oceanguard-marine-debris with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use asferrer/gemma-4-E2B-it-oceanguard-marine-debris with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-4-e2b-it-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "asferrer/gemma-4-E2B-it-oceanguard-marine-debris") - LiteRT-LM
How to use asferrer/gemma-4-E2B-it-oceanguard-marine-debris with LiteRT-LM:
# LiteRT-LM runs on various platforms (Android, iOS, Windows, Linux, macOS, IoT, Web/WASM) # and supports many APIs (C++, Python, Kotlin, Swift, JavaScript, Flutter). # For platform-specific integration guides, please refer to the official developer website: # https://ai.google.dev/edge/litert-lm # To try LiteRT-LM, the easiest way is to use our CLI tool. # 1. Install the LiteRT-LM CLI tool: pip install -U litert-lm # 2. Download and run this model locally: # See: https://ai.google.dev/edge/litert-lm/cli litert-lm run \ --from-huggingface-repo=asferrer/gemma-4-E2B-it-oceanguard-marine-debris \ --prompt="Write me a poem"
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use asferrer/gemma-4-E2B-it-oceanguard-marine-debris 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 asferrer/gemma-4-E2B-it-oceanguard-marine-debris:Q4_K_M # Run inference directly in the terminal: llama cli -hf asferrer/gemma-4-E2B-it-oceanguard-marine-debris:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf asferrer/gemma-4-E2B-it-oceanguard-marine-debris:Q4_K_M # Run inference directly in the terminal: llama cli -hf asferrer/gemma-4-E2B-it-oceanguard-marine-debris: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 asferrer/gemma-4-E2B-it-oceanguard-marine-debris:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf asferrer/gemma-4-E2B-it-oceanguard-marine-debris: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 asferrer/gemma-4-E2B-it-oceanguard-marine-debris:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf asferrer/gemma-4-E2B-it-oceanguard-marine-debris:Q4_K_M
Use Docker
docker model run hf.co/asferrer/gemma-4-E2B-it-oceanguard-marine-debris:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use asferrer/gemma-4-E2B-it-oceanguard-marine-debris with Ollama:
ollama run hf.co/asferrer/gemma-4-E2B-it-oceanguard-marine-debris:Q4_K_M
- Unsloth Desktop
- Pi
How to use asferrer/gemma-4-E2B-it-oceanguard-marine-debris with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf asferrer/gemma-4-E2B-it-oceanguard-marine-debris: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": "asferrer/gemma-4-E2B-it-oceanguard-marine-debris:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use asferrer/gemma-4-E2B-it-oceanguard-marine-debris with Docker Model Runner:
docker model run hf.co/asferrer/gemma-4-E2B-it-oceanguard-marine-debris:Q4_K_M
- Lemonade
How to use asferrer/gemma-4-E2B-it-oceanguard-marine-debris with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull asferrer/gemma-4-E2B-it-oceanguard-marine-debris:Q4_K_M
Run and chat with the model
lemonade run user.gemma-4-E2B-it-oceanguard-marine-debris-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use asferrer/gemma-4-E2B-it-oceanguard-marine-debris with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf asferrer/gemma-4-E2B-it-oceanguard-marine-debris: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 asferrer/gemma-4-E2B-it-oceanguard-marine-debris:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use asferrer/gemma-4-E2B-it-oceanguard-marine-debris with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf asferrer/gemma-4-E2B-it-oceanguard-marine-debris: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 "asferrer/gemma-4-E2B-it-oceanguard-marine-debris: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"
| {{ bos_token }}{%- macro strip_thinking(text) -%} | |
| {%- set ns = namespace(result='') -%} | |
| {%- for part in text.split('<channel|>') -%} | |
| {%- if '<|channel>' in part -%} | |
| {%- set ns.result = ns.result + part.split('<|channel>')[0] -%} | |
| {%- else -%} | |
| {%- set ns.result = ns.result + part -%} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {{- ns.result | trim -}} | |
| {%- endmacro -%} | |
| {%- set thinking = enable_thinking is defined and enable_thinking -%} | |
| {%- set loop_messages = messages -%} | |
| {%- if messages[0]['role'] in ['system', 'developer'] or thinking -%} | |
| {{ '<|turn>system | |
| ' }} | |
| {%- if thinking -%} | |
| {{ '<|think|> | |
| ' }} | |
| {%- endif -%} | |
| {%- if messages[0]['role'] in ['system', 'developer'] -%} | |
| {{ messages[0]['content'] | trim }} | |
| {%- set loop_messages = messages[1:] -%} | |
| {%- endif -%} | |
| {{ '<turn|> | |
| ' }} | |
| {%- endif -%} | |
| {%- for message in loop_messages -%} | |
| {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%} | |
| {{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }} | |
| {%- endif -%} | |
| {%- if (message['role'] == 'assistant') -%} | |
| {%- set role = "model" -%} | |
| {%- else -%} | |
| {%- set role = message['role'] -%} | |
| {%- endif -%} | |
| {{ '<|turn>' + role + ' | |
| ' }} | |
| {%- if message['content'] is string -%} | |
| {%- if role == "model" -%} | |
| {{ strip_thinking(message['content']) }} | |
| {%- else -%} | |
| {{ message['content'] | trim }} | |
| {%- endif -%} | |
| {%- elif message['content'] is iterable -%} | |
| {%- for item in message['content'] -%} | |
| {%- if item['type'] == 'audio' -%} | |
| {{ '<|audio|>' }} | |
| {%- elif item['type'] == 'image' -%} | |
| {{ '<|image|>' }} | |
| {%- elif item['type'] == 'video' -%} | |
| {{ '<|video|>' }} | |
| {%- elif item['type'] == 'text' -%} | |
| {%- if role == "model" -%} | |
| {{ strip_thinking(item['text']) }} | |
| {%- else -%} | |
| {{ item['text'] | trim }} | |
| {%- endif -%} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {%- else -%} | |
| {{ raise_exception("Invalid content type") }} | |
| {%- endif -%} | |
| {{ '<turn|> | |
| ' }} | |
| {%- endfor -%} | |
| {%- if add_generation_prompt -%} | |
| {{'<|turn>model | |
| '}} | |
| {%- endif -%} | |