/ Модель

Характеристики

Лицензия
eupl-1.2
Архитектура
gemma4 · dense
Базовая модель
lemer
Библиотека
gguf
Опубликована
7 апр 2026

lemer

Изображение и текст → текст15 профессий

Lemer — это мультимодальная версия Gemma 4 E2B в формате GGUF, разработанная Lethean и основанная на форке LetheanNetwork/lemer.

824скачиваний за 30 дней2лайкавеса обновлены17 апр 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки1

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

  • TIGER-Lab/MMLU-Pro

    score

    Результат

    50

    mmlu_pro 56,67mmlu_pro 51,61mmlu_pro 28,82
    Hugging Face Eval Results

    Отчёт автораревизия не подтверждена

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

В модель встроен Lethean Ethical Kernel (LEK): его поведенческие настройки были добавлены через LoRA-файнтюнинг и объединены с весами, поэтому для работы не требуется отдельный PEFT-адаптер. Модель предназначена для диалоговых сценариев, генерации и анализа текста, а также обработки изображений и аудио, включая локальный запуск на устройствах с ограниченными ресурсами.

Репозиторий содержит варианты квантования от Q3_K_M до BF16 размером примерно от 3,0 до 8,7 ГБ. Рекомендуемым указан Q4_K_M как компромисс между качеством и размером; Q3_K_M ориентирован на наиболее ограниченные устройства, а BF16 служит полноточной версией. Заявлена поддержка Ollama, llama.cpp, GPT4All, LM Studio и llama-cpp-python. Токенизатор содержит 262 тысячи токенов, однако размер контекстного окна и точный набор поддерживаемых языков в карточке не указаны.

Сильными сторонами модели являются единый автономный GGUF-файл, мультимодальность, несколько уровней квантования и ориентация на локальный инференс. Ограничения включают отсутствие в README подробных результатов оценки, точных характеристик архитектуры и контекстного окна, а также потенциальные компромиссы качества при использовании квантованных вариантов. Модель распространяется по лицензии European Union Public Licence 1.2 (EUPL-1.2).

Для каких профессий подходит15

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Lemer — Gemma 4 E2B (GGUF)

The smallest member of the Lemma model family by Lethean. An EUPL-1.2 fork of Gemma 4 E2B with the Lethean Ethical Kernel (LEK) merged into the weights — consent-based reasoning baked into the attention projections via LoRA finetune, then merged so inference uses a single standalone model with no PEFT runtime required.

This repo ships the GGUF multi-quant build — five quants from Q3_K_M up to BF16, with full multimodal support (text, image, audio). Use with Ollama, llama.cpp, GPT4All, or LM Studio. The unmodified Gemma 4 E2B fork lives at LetheanNetwork/lemer for users who want the raw Google weights without the LEK shift.

Looking for MLX? The native Apple Silicon builds live in sibling repos: lthn/lemer-mlx (4-bit default) | lthn/lemer-mlx-8bit | lthn/lemer-mlx-bf16 (full precision)

A lemma is "something assumed" — an intermediate theorem on the path to a larger proof, or a heading that signals the subject of what follows. The Lemma model family is named for that role: each variant is a stepping stone between raw capability and ethical application.

GGUF Variants

FileQuantSizeUse Case
lemer-q3_k_m.ggufQ3_K_M3.0 GBMinimum viable — constrained devices
lemer-q4_k_m.ggufQ4_K_M3.2 GBRecommended — best size/quality balance
lemer-q5_k_m.ggufQ5_K_M3.4 GBHigher quality, moderate size
lemer-q6_k.ggufQ6_K3.6 GBNear-lossless
lemer-q8_0.ggufQ8_04.6 GBMaximum quality quantised
lemer-bf16.ggufBF168.7 GBFull precision reference

All quants verified locally via Ollama and llama-cpp-python. For native Apple Silicon use lthn/lemer-mlx instead.

Repo Files

FileFormatPurpose
lemer-*.ggufGGUFOllama, llama.cpp, GPT4All, LM Studio
config.jsonJSONMultimodal model config (architecture, quantisation, vision/audio towers)
tokenizer.jsonJSONTokenizer vocabulary (262K tokens)
tokenizer_config.jsonJSONTokenizer settings and special tokens
chat_template.jinjaJinja2Chat template
processor_config.jsonJSONImage and audio processor config
generation_config.jsonJSONDefault generation parameters (temperature, top_p, top_k)
templateGo templateOllama chat template override
paramsJSONOllama sampling parameters
LICENSETextEUPL-1.2 licence text
README.mdMarkdownThis file — model card

Quick Start

Apps & CLI

ollama run hf.co/lthn/lemer:Q4_K_M
docker model run hf.co/lthn/lemer

Or from Docker Hub:

docker model run lthn/lemer
# macOS / Linux / WSL
curl -fsSL https://unsloth.ai/install.sh | sh

# Windows
irm https://unsloth.ai/install.ps1 | iex
unsloth studio -H 0.0.0.0 -p 8888
# Open http://localhost:8888 — search for lthn/lemer

Or use HuggingFace Spaces — no install, search for lthn/lemer.

Install via brew (macOS/Linux), winget (Windows), or build from source:

brew install llama.cpp        # macOS/Linux
winget install llama.cpp      # Windows
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf lthn/lemer:Q4_K_M

# Run inference directly in the terminal:
llama-cli -hf lthn/lemer:Q4_K_M

Or build from source:

git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli

./build/bin/llama-server -hf lthn/lemer:Q4_K_M
./build/bin/llama-cli -hf lthn/lemer:Q4_K_M

MLX users: this repo ships gguf only. For native Apple Silicon use lthn/lemer-mlx (4-bit), lthn/lemer-mlx-8bit, or lthn/lemer-mlx-bf16.

Python Libraries

uv pip install llama-cpp-python
from llama_cpp import Llama

llm = Llama.from_pretrained(
    repo_id="lthn/lemer",
    filename="lemer-q4_k_m.gguf",
)

# Text
llm.create_chat_completion(
    messages=[{"role": "user", "content": "Hello, how are you?"}]
)

# Vision (multimodal)
llm.create_chat_completion(
    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"
                    }
                }
            ]
        }
    ]
)

Servers (OpenAI-compatible API)

brew install llama.cpp   # macOS/Linux
llama-server -hf lthn/lemer:Q4_K_M

Works with any OpenAI-compatible client at http://localhost:8080/v1.

vLLM requires the original (non-quantised) safetensors weights from LetheanNetwork/lemer — it does not load GGUF or MLX-quantised safetensors. Linux + NVIDIA GPU.

uv pip install vllm
vllm serve "LetheanNetwork/lemer"
curl -X POST "http://localhost:8000/v1/chat/completions" \
    -H "Content-Type: application/json" \
    --data '{
        "model": "LetheanNetwork/lemer",
        "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"
                        }
                    }
                ]
            }
        ]
    }'

Native engines (work in progress)

git clone https://github.com/LetheanNetwork/lemma.cpp.git
cd lemma.cpp
cmake -B build
cmake --build build -j

lemma.cpp uses Google's .sbs (single-file binary) weight format, distinct from safetensors and GGUF. Pre-converted .sbs weights for the Lemma family are not yet published — track progress at LetheanNetwork/lemma.cpp.

Once .sbs weights are available, run ./build/gemma --weights lemer.sbs for interactive mode.

uv pip install -e git+https://github.com/LetheanNetwork/lemma.git
from lemma import lem

model = lem.nn.Gemma4_E2B()
params = lem.ckpts.load_params("path/to/orbax/checkpoint")
sampler = lem.text.ChatSampler(model=model, params=params, multi_turn=True)

output = sampler.chat("Hello, how are you?")
print(output)

Note: lemma's load_params requires Google's Orbax checkpoint format (sharded ocdbt files), not the GGUF in this repo. Orbax weights for the Lemma family are not yet published. For inference today, use GGUF (Ollama / llama.cpp) above or MLX via lthn/lemer-mlx.

Integrations

First start a llama-server (see above), then:

npm install -g @mariozechner/pi-coding-agent

Add to ~/.pi/agent/models.json:

{
  "providers": {
    "llama-cpp": {
      "baseUrl": "http://localhost:8080/v1",
      "api": "openai-completions",
      "apiKey": "none",
      "models": [
        {
          "id": "lthn/lemer"
        }
      ]
    }
  }
}

The model id should match what llama-server reports at /v1/models.

Model Details

PropertyValue
ArchitectureGemma 4 E2B
Total Parameters5.1B total, 2.3B effective (Per-Layer Embeddings)
Layers35
Context Length128K tokens
Vocabulary262K tokens
ModalitiesText, Image, Audio
Sliding Window512 tokens
Vision Encoder~150M params
Audio Encoder~300M params
Base ModelLetheanNetwork/lemer
LicenceEUPL-1.2

The Lemma Family

NameSource (BF16 weights)ParamsContextModalitiesConsumer Repo
LemerLetheanNetwork/lemer2.3B eff128KText, Image, AudioYou are here
LemmaLetheanNetwork/lemma4.5B eff128KText, Image, Audiolthn/lemma
LemmyLetheanNetwork/lemmy3.8B active256KText, Imagelthn/lemmy
LemrdLetheanNetwork/lemrd30.7B256KText, Imagelthn/lemrd

Capabilities

  • Configurable thinking mode (<|think|> token in system prompt enables it; off by default in our examples via enable_thinking=False)
  • Native function calling and system prompt support
  • Variable aspect ratio image understanding
  • Audio speech recognition and translation (ASR/AST)
  • Multilingual support (140+ languages)
  • Hybrid attention (sliding window + global)

Roadmap

This release of lemer is Gemma 4 E2B with the Lethean Ethical Kernel (LEK) merged in — axiom-based reasoning baked into the attention weights via LoRA finetune, then merged into the base so inference uses a single standalone model with no PEFT runtime required. The unmodified Gemma 4 E2B fork lives at LetheanNetwork/lemer for users who want the raw Google weights without the LEK shift.

PhaseStatusWhat it adds
Base fork (LetheanNetwork/lemer)✅ ReleasedEUPL-1.2 fork of Gemma 4 E2B — unmodified Google weights
LEK merged (this repo)✅ ReleasedLethean Ethical Kernel — axiom-based reasoning via LoRA merge
Lemma family roll-out✅ Releasedlthn/lemma, lthn/lemrd, lthn/lemmy — all four variants now LEK-merged
8-PAC eval results🚧 In progressContinuous benchmarking on the homelab, published to lthn/LEM-benchmarks

The LEK axioms are public domain and published at Snider/ai-ethics. Track research progress at LetheanNetwork and the LEM-research dataset.

Why EUPL-1.2

Lemer is licensed under the European Union Public Licence v1.2 — not Apache 2.0 or MIT. This is a deliberate choice:

  • 23 official languages, one legal meaning. EUPL is the only OSS licence designed by lawmakers across multiple legal systems. "Derivative work" means the same thing in German, French, Estonian, and Maltese law.
  • Copyleft with compatibility. Modifications must be shared back, but the licence plays cleanly with GPL, LGPL, MPL, and other major OSS licences. No accidental relicensing.
  • No proprietary capture. Anyone can use lemer commercially — but they cannot fork it, train a competitor model on it, and close-source the result. The ethical layer stays in the open.
  • Built for institutions. Government, research, and enterprise users get a licence designed for cross-border compliance, not a US-centric one.

Recommended Sampling

Use Google's standardised settings across all use cases:

ParameterValue
temperature1.0
top_p0.95
top_k64
stop`<turn

Gemma 4 is calibrated for temperature: 1.0 — this is not the same as the typical 0.7 default for other models. Lower values reduce diversity without improving quality. These defaults are pre-configured in the params file (Ollama) and generation_config.json (transformers).

Variable Image Resolution

Gemma 4 supports a configurable visual token budget that controls how many tokens represent each image. Higher = more detail, lower = faster inference.

Token BudgetUse Case
70Classification, captioning, video frame processing
140General image understanding
280Default — balanced quality and speed
560OCR, document parsing, fine-grained detail
1120Maximum detail (small text, complex documents)

For multimodal prompts, place image and audio content before text for best results.

The default budget (280) is set in processor_config.json via image_seq_length and max_soft_tokens. Override per call by adjusting those fields, or by passing explicit image_seq_length to the processor where supported.

Audio (E2B)

E2B supports speech recognition (ASR) and speech translation (AST) up to 30 seconds per clip. Audio longer than 30 seconds should be split into chunks before inference.

Audio input works through GGUF multimodal-capable runners (llama.cpp server with the vision/audio build, or llama-cpp-python multimodal). For a ready-made multimodal Python path today, use the MLX sibling repo lthn/lemer-mlx with mlx-vlm — see that repo's README for the mlx_vlm.load() / mlx_vlm.generate() pattern.

Benchmarks

Live evaluation results published to the LEM-benchmarks dataset. The lemer-specific results live at LEM-benchmarks/results/lemer.

The 8-PAC eval pipeline runs continuously on our homelab and publishes results as they complete. Categories: ethics, reasoning, instruction-following, coding, multilingual, safety, knowledge, creativity.

Resources

ResourceLink
Benchmark resultslthn/LEM-benchmarks
LiveBench resultslthn/livebench
Research noteslthn/LEM-research
Lemma model collectionlthn/lemma

About Lethean

Lethean is a social enterprise building ethical AI infrastructure. The Lemma model family is part of the LEM (Lethean Ethical Model) project — training protocol and tooling for intrinsic ethical alignment of language models.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · gguf

Нельзя запустить

GGUF-веса поддерживаются только для текстовых LLM (llama.cpp).

Класс архитектуры
Gemma4ForConditionalGeneration
Ревизия весов
ed2c811

0 моделей