Instructions to use zelk12/MT_gemma-4-8B-E4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use zelk12/MT_gemma-4-8B-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 zelk12/MT_gemma-4-8B-E4B:Q6_K # Run inference directly in the terminal: llama cli -hf zelk12/MT_gemma-4-8B-E4B:Q6_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf zelk12/MT_gemma-4-8B-E4B:Q6_K # Run inference directly in the terminal: llama cli -hf zelk12/MT_gemma-4-8B-E4B:Q6_K
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 zelk12/MT_gemma-4-8B-E4B:Q6_K # Run inference directly in the terminal: ./llama-cli -hf zelk12/MT_gemma-4-8B-E4B:Q6_K
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 zelk12/MT_gemma-4-8B-E4B:Q6_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf zelk12/MT_gemma-4-8B-E4B:Q6_K
Use Docker
docker model run hf.co/zelk12/MT_gemma-4-8B-E4B:Q6_K
- LM Studio
- Jan
- vLLM
How to use zelk12/MT_gemma-4-8B-E4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zelk12/MT_gemma-4-8B-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": "zelk12/MT_gemma-4-8B-E4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/zelk12/MT_gemma-4-8B-E4B:Q6_K
- Ollama
How to use zelk12/MT_gemma-4-8B-E4B with Ollama:
ollama run hf.co/zelk12/MT_gemma-4-8B-E4B:Q6_K
- Unsloth Desktop
- Pi
How to use zelk12/MT_gemma-4-8B-E4B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf zelk12/MT_gemma-4-8B-E4B:Q6_K
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": "zelk12/MT_gemma-4-8B-E4B:Q6_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use zelk12/MT_gemma-4-8B-E4B with Docker Model Runner:
docker model run hf.co/zelk12/MT_gemma-4-8B-E4B:Q6_K
- Lemonade
How to use zelk12/MT_gemma-4-8B-E4B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull zelk12/MT_gemma-4-8B-E4B:Q6_K
Run and chat with the model
lemonade run user.MT_gemma-4-8B-E4B-Q6_K
List all available models
lemonade list
- Hermes Agent
How to use zelk12/MT_gemma-4-8B-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 zelk12/MT_gemma-4-8B-E4B:Q6_K
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 zelk12/MT_gemma-4-8B-E4B:Q6_K
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use zelk12/MT_gemma-4-8B-E4B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf zelk12/MT_gemma-4-8B-E4B:Q6_K
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 "zelk12/MT_gemma-4-8B-E4B:Q6_K" \ --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"
EN
Arcee Fusion is used for merging.
Some information on merging can be found here: https://huggingface.co/zelk12/Mergekit_Gemma-4-E2B
The first experimental combination of gemma-4-E4B models probably resulted in many errors, and some of the elements included in the composition turned out to have a higher average result according to BenchLocal than this final version.
As of 10/19/2026, ggml-org/gguf-my-repo does not quantize gemma-4-E4B models, so the quantization was done using Unsloth Studio MT_gemma-4-8B-E4B.Q6_K.gguf.
#GGUF
If I don’t delete it and forget to post it, then GGUF probably Q6 of this model can be found here: https://huggingface.co/zelk12/MT_gemma-4-8B-E4B-Q6_K-GGUF
You can also often find GGUF and imatrix GGUF here: mradermacher Most often I use their quanta myself if possible.
Well, sometimes he also posts my models: Otakadelic But in addition, he himself is also involved in combining models.
Information
What does the model name MT_gemma-4-8B-E4B mean?
MT=merge test, just a merge test and a number, per generation.Gen- what generation of associations this is, in general, it is not tied to anything, just an additional number, but usually the generation can change when I test, some completely new options. I also try not to include models of the same generation into the association.
Based on the name of the original model Gemma-4-E4B-it
Gemma is Google's family of open models.
4is essentially a generation of the model.E4B- means that the model uses all effective parameters, which when executed are equal to 4.5 billion ordinary parameters, or so. PLE layers are used for this, where each layer is connected to its own embedding layer, thus the total number of model parameters is 8 billion.it=instruction tuned, means that the model is prepared to work with instructions for this model to form a chat.
The hypothetical model itself can work with a 128k context. The sliding attention window has a size of 512 tokens.
A variable aspect ratio function and image encoding options in 70, 140, 280, 560, 1120 tokens have been introduced.
Additionally, Gemma-4-E4B-it models are usually capable of working with audio data.
Data on tokens may have changed due to the fact that this is not pure Gemma-4-E4B, but its combinations.
RU
Для объединения применяется Arcee Fusion.
Некоторая информация по объединению, находится здесь: https://huggingface.co/zelk12/Mergekit_Gemma-4-E2B
Первое эксперементальное объединение, моделей gemma-4-E4B, в результат, вероятно было допущено много ошибок, и часть, элементов, которые входят в состав, по BenchLocal оказались выше по среднему результату, чем данный финальный вариант.
На 19.10.2026 ggml-org/gguf-my-repo не квантует модели gemma-4-E4B, по этому, квант, был сделан, при помощи Unsloth Studio MT_gemma-4-8B-E4B.Q6_K.gguf.
GGUF
Если я не удалю и не забуду выложить, тогда GGUF вероятно Q6 этой модели можно будете найти здесь: https://huggingface.co/zelk12/MT_gemma-4-8B-E4B-Q6_K-GGUF
Также нередко GGUF и imatrix GGUF можно найти зесь: mradermacher Чаще всего я сам использую их кванты если это возможно.
Ну и иногда он тоже выкладывает мои модели: Otakadelic Но кроме того, он ещё и сам занимается объединением моделей.
Информация
Что значит название моделией MT_gemma-4-8B-E4B
MT=merge test, просто проверка объединений и номер, в поколении.Gen- какое это поколение объединений, в целом, оно мало к чему привязано, просто дополнительная цифра, но обычно поколение может изменится, когда тестирую, какие-то совсем новые варианты. Также стараюсь не вводить в состав объединения, модели с тем же поколением.
По названию оригинальной модели Gemma-4-E4B-it
Gemma - семейство открытых моделей Google.
4- это по своей сути поколение модели.E4B- значит что у модели всего используются эффективные параметры, которые при выполнении равны 4,5 миллиардам обычных параметров, или около того. Используются для этого слои PLE, где к каждому слою, подключён свой слой встраивания, таким образом, суммарное количество параметров модели 8 миллиардов.it=instruction tuned, значит что модель подготовлена работать с инструкциями для данной модели, для формирования чата.
Сама модель гипотетический может работать с контекстом 128к. Скользящее окно внимания имеет размер 512 токена.
Введена функция переменного соотношения сторон и варианты кодировки изображения в 70, 140, 280, 560, 1120 токенов.
Дополнительно модели Gemma-4-E4B-it обычно способны работать с аудио данными.
Данные по токенам могли измениться, из-за того что это не чистая Gemma-4-E4B, а её объединения.
MT_gemma-4-8B-E4B
MT_gemma-4-8B-E4B is a merge of the following models using LazyMergekit:
- I:\ML\Merge\Test\0\SourceModel\Step2\merge0_75_GIFD_UGIFE_GMF_IF_TC_RM
- I:\ML\Merge\Test\0\SourceModel\Step2\merge0_5_GIFD_GN_Gi_IF_DE_PA
🧩 Configuration
Step 1
MT_UGIFE_GIFD_IF_TC
- model: armand0e/Gemma-4-E4B-it-Fable-Distill
parameters:
density: 0.75
weight: 0.5
- model: Prompt48/unsloth_gemma_4-E4B-it_FT_Emotion
parameters:
density: 0.25
weight: 0.5
merge_method: arcee_fusion
base_model: armand0e/Gemma-4-E4B-it-Fable-Distill
parameters:
normalize: true
dtype: bfloat16
tokenizer_source: base
MT_GIFD_GN_IF_DE
- model: armand0e/Gemma-4-E4B-it-Fable-Distill
parameters:
density: 0.25
weight: 0.5
- model: andyoneal/Gemma-4-E4B-Nightcap
parameters:
density: 0.75
weight: 0.5
merge_method: arcee_fusion
base_model: armand0e/Gemma-4-E4B-it-Fable-Distill
parameters:
normalize: true
dtype: bfloat16
tokenizer_source: base
MT_GIFD_GMF_IF_RM
- model: armand0e/Gemma-4-E4B-it-Fable-Distill
parameters:
density: 0.75
weight: 0.5
- model: Nubinu/Gemma4-E4B-MiniFantasy-V1
parameters:
density: 0.25
weight: 0.5
merge_method: arcee_fusion
base_model: armand0e/Gemma-4-E4B-it-Fable-Distill
parameters:
normalize: true
dtype: bfloat16
tokenizer_source: base
MT_GIFD_GI_IF_PA
- model: armand0e/Gemma-4-E4B-it-Fable-Distill
parameters:
density: 0.5
weight: 0.5
- model: google/gemma-4-E4B-it
parameters:
density: 0.5
weight: 0.5
merge_method: arcee_fusion
base_model: armand0e/Gemma-4-E4B-it-Fable-Distill
parameters:
normalize: true
dtype: bfloat16
tokenizer_source: base
Step 2
MT_GIFD_GN_Gi_IF_DE_PA
- model: MT_GIFD_GN_IF_DE
parameters:
density: 0.5
weight: 0.5
- model: MT_GIFD_GI_IF_PA
parameters:
density: 0.5
weight: 0.5
merge_method: arcee_fusion
base_model: MT_GIFD_GN_IF_DE
parameters:
normalize: true
dtype: bfloat16
tokenizer_source: base
MT_GIFD_UGIFE_GMF_IF_TC_RM
- model: MT_UGIFE_GIFD_IF_TC
parameters:
density: 0.75
weight: 0.5
- model: MT_GIFD_GMF_IF_RM
parameters:
density: 0.25
weight: 0.5
merge_method: arcee_fusion
base_model: MT_UGIFE_GIFD_IF_TC
parameters:
normalize: true
dtype: bfloat16
tokenizer_source: base
Step 3
MT_gemma-4-8B-E4B
- model: MT_GIFD_UGIFE_GMF_IF_TC_RM
parameters:
density: 0.5
weight: 0.5
- model: andyoneal/Gemma-4-E4B-Nightcap
parameters:
density: 0.5
weight: 0.5
merge_method: arcee_fusion
base_model: MT_GIFD_UGIFE_GMF_IF_TC_RM
parameters:
normalize: true
dtype: bfloat16
tokenizer_source: base
💻 Usage
!pip install -qU transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "zelk12/MT_gemma-4-8B-E4B"
messages = [{"role": "user", "content": "What is a large language model?"}]
tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
- Downloads last month
- 218