/ Модель

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

Контекст
262 144 токена
Лицензия
Apache 2.0
Архитектура
clewen · dense
Базовая модель
clef
Библиотека
transformers
Опубликована
6 окт 2026

clewen

Генерация текстаТекст → текст

Clewen объединяет мультимодальную генерацию Qwen3.8-27B со структурированными решениями Cloudflare Clef для диалогов, анализа изображений и классификации намерений.

193скачиваний за 30 дней0лайковвеса обновлены7 окт 2026

Бенчмарки

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

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

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

В подключённых источниках результатов для этой модели пока нет.

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

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

Clewen — плотная мультимодальная модель, созданная salyamq на основе Qwen3.8-27B и Cloudflare Clef. Она объединяет генерацию текста и изображений Qwen с режимом структурированных решений Clef на общей основе. Для режима решений используются восстановленные переключаемые адаптеры и исходная совместная schema head Clef; дополнительного обучения не проводилось, а восстановленные адаптеры лишь приближённо воспроизводят изменения модели.

Модель принимает текст и изображения в обоих режимах, а входы для режима решений могут также содержать JSON. Режим выбирается явно. Карточка приводит результаты тестирования структурированных решений на BFCL, API-Bank и BANKING77, но эти оценки не характеризуют качество генерации текста. Репозиторий использует Transformers и формат safetensors; лицензия — Apache-2.0.

Сценарии применения

  • формирование структурированных решений по текстовому запросу
  • выбор действия или вызова API по описанию задачи
  • классификация намерений в банковских запросах
  • ответы на вопросы по изображению
  • диалог с текстовыми и визуальными входами

Ограничения

Адаптеры режима решений восстановлены приближённо и не являются исходными LoRA-факторами. Приведённые оценки относятся к структурированным решениям и не показывают качество генерации текста.

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

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

Открыть на Hugging Face

Clewen

Clewen combines Qwen3.8-27B text and image generation with Cloudflare Clef structured decisions, sharing one backbone. The decision mode uses recovered switchable adapters and the original Clef joint schema head. No additional training was performed. Recovered adapters approximate the learned changes; they are not the original LoRA factors.

Usage

Both modes support text and images. Decision inputs can also contain JSON. Modes are selected explicitly:

  • Qwen: text generation and image understanding.
  • Clef: structured answers with probabilities for choice, noul (yes/no), and score questions.

Required runtime packages:

torch==2.10.0
torchvision==0.25.0
transformers==5.10.2
huggingface-hub>=1.5,<2
accelerate>=1.12,<2
safetensors>=0.6,<1
pillow>=11,<13
numpy>=2,<3

The clewen[cuda] installation below also installs flash-linear-attention[cuda]==0.5.2 and a prebuilt causal-conv1d==1.7.0 wheel for Python 3.11 or 3.12.

Use Transformers 5.10.2. Older versions such as 4.56.0 fail to import PreTrainedConfig from this release. In Jupyter, use %pip instead of pip in the commands below, then restart the kernel and rerun the imports after installation.

Install on Linux with Python 3.11 or 3.12 and a CUDA GPU:

pip install torch==2.10.0 torchvision==0.25.0 --index-url https://download.pytorch.org/whl/cu128
pip install "clewen[cuda] @ git+https://github.com/salyamq/clewer.git"
from PIL import Image
from transformers import AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained(
    "salyamq/clewen",  # or "salyamq/clewen-flash"
    trust_remote_code=True,
    device_map="cuda",
    dtype="bfloat16",
)

# 1. Qwen: text generation
reply = model.text(
    [{
        "role": "user",
        "content": "Explain gradient descent in plain language and give one simple example.",
    }],
    max_new_tokens=256,
)
print(reply["answer"])

# 2. Clef: structured decision from text
result = model.decision({
    "state": "I was charged twice for my monthly subscription. Please refund the duplicate charge.",
    "questions": {
        "department": {
            "type": "choice",
            "instructions": "Which support department should handle this request?",
            "criteria": {
                "billing": "Payments, invoices, subscriptions, and refunds.",
                "technical": "Software errors, connection issues, and service outages.",
                "account": "Login, passwords, and account access.",
            },
        },
    },
})
print(result["answers"]["department"])

# 3. Qwen: text generation from a photo
image = Image.open("example.jpg").convert("RGB")
reply = model.text(
    [{
        "role": "user",
        "content": [
            {"type": "image", "image": image},
            {"type": "text", "text": "Describe this photo in two sentences."},
        ],
    }],
    max_new_tokens=128,
)
print(reply["answer"])

# 4. Clef: structured decision from a photo
result = model.decision({
    "state": "Inspect the attached photo and decide whether a cat is visible.",
    "images": [image],
    "questions": {
        "cat_visible": {
            "type": "noul",
            "instructions": "Is at least one cat visible in the photo?",
        },
    },
})
print(result["answers"]["cat_visible"])

For text or JSON decisions, omit images and put your information in state. Both modes use the same loaded model instance.

Results

Decision-mode scores from complete evaluation runs. Scores are percentages; higher is better. Workflow exact-action scores require the complete action set to match the reference labels.

Benchmark / metricClewenClewen-FlashClefClef-FlashJevDiffusionGemma JevKev 9BLaya
BFCL — case exact accuracy98.4198.8898.598.895.896.594.538.1
API-Bank — accuracy91.7393.1191.993.188.283.756.311.5
BANKING77 — macro-F194.0890.8094.290.979.774.384.814.3
RAGTruth — hallucination F179.3035.7479.435.676.570.446.248.8
When2Call MCQ — accuracy72.4865.3672.465.681.075.449.611.9
Invoice processing — exact actions64.6757.1164.757.161.8———
Invoice processing — primary action86.4474.2286.273.383.1———
Customer service — exact actions76.3176.9676.377.076.0———
Security incidents — exact actions63.3361.6762.961.761.7———
Agent trace observability — primary action68.4769.8268.569.871.6———
Decision latency — median, ms ↓142.3078.06209.338.8524.184.451.45.8
Decision latency — p95, ms ↓274.15111.26238.6122.4536.0211.2187.9222.5

Latency was measured on one H200 in BF16 across the five Decision Index benchmarks. It includes input encoding and answer decoding, excluding model loading and warmup. These evaluations measure structured decisions, not text-generation quality.

License

Apache-2.0. Qwen components are credited to the Qwen authors; Clef components are credited to Cloudflare. See LICENSE, LICENSE-QWEN, LICENSE-CLEF, and NOTICE for attribution and license details.

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

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

0 моделей