/ Модель

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

Лицензия
Своя лицензия
Опубликована
12 мар 2025

gemma-3-12b-it-imatrix-GGUF

Генерация текстаТекст → текст15 профессий

duyntnet/gemma-3-12b-it-imatrix-GGUF — набор квантованных GGUF-вариантов инструкционно дообученной мультимодальной модели Gemma 3 12B IT, разработанной Google.

505скачиваний за 30 дней0лайковвеса обновлены10 апр 2025

Бенчмарки

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

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

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

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

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

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

Модель предназначена для генерации текста, ответов на вопросы, суммаризации, рассуждений и анализа изображений с выдачей текстового ответа. Квантованные варианты ориентированы на локальный запуск с ограниченными ресурсами через llama.cpp и совместимые клиенты, включая KoboldCPP, Ollama, LM Studio и другие.

Модель принимает текст и изображения: изображения нормализуются до 896×896 пикселей и кодируются в 256 токенов каждое. Заявлены поддержка более 140 языков, контекст до 128K токенов для версии 12B и максимальный объём генерируемого текста до 8192 токенов. Использование imatrix-квантизации уменьшает требования к памяти по сравнению с полноразмерными весами, но конкретные характеристики качества и расхода ресурсов зависят от выбранного файла квантизации.

Сильными сторонами являются мультимодальность, большой контекст, многоязычность и возможность локального развертывания. Ограничения включают зависимость от совместимого программного обеспечения: для запуска требуется llama.cpp версии b4875 или новее; квантование также может снижать точность по сравнению с исходной моделью. В README лицензия указана как other, без дополнительных условий, поэтому перед использованием необходимо проверить лицензионные положения исходной Gemma 3 12B IT и конкретного файла модели.

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

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

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

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

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

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

Открыть на Hugging Face

Quantizations of https://huggingface.co/google/gemma-3-12b-it

Note: you will need llama.cpp b4875 or later to run the model.

Open source inference clients/UIs

Closed source inference clients/UIs


From original readme

Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models. Gemma 3 models are multimodal, handling text and image input and generating text output, with open weights for both pre-trained variants and instruction-tuned variants. Gemma 3 has a large, 128K context window, multilingual support in over 140 languages, and is available in more sizes than previous versions. Gemma 3 models are well-suited for a variety of text generation and image understanding tasks, including question answering, summarization, and reasoning. Their relatively small size makes it possible to deploy them in environments with limited resources such as laptops, desktops or your own cloud infrastructure, democratizing access to state of the art AI models and helping foster innovation for everyone.

Inputs and outputs

  • Input:

    • Text string, such as a question, a prompt, or a document to be summarized
    • Images, normalized to 896 x 896 resolution and encoded to 256 tokens each
    • Total input context of 128K tokens for the 4B, 12B, and 27B sizes, and 32K tokens for the 1B size
  • Output:

    • Generated text in response to the input, such as an answer to a question, analysis of image content, or a summary of a document
    • Total output context of 8192 tokens

Usage

Below, there are some code snippets on how to get quickly started with running the model. First, install the Transformers library with the version made for Gemma 3:

$ pip install git+https://github.com/huggingface/transformers@v4.49.0-Gemma-3

Then, copy the snippet from the section that is relevant for your use case.

Running with the pipeline API

You can initialize the model and processor for inference with pipeline as follows.

from transformers import pipeline
import torch

pipe = pipeline(
    "image-text-to-text",
    model="google/gemma-3-12b-it",
    device="cuda",
    torch_dtype=torch.bfloat16
)

With instruction-tuned models, you need to use chat templates to process our inputs first. Then, you can pass it to the pipeline.

messages = [
    {
        "role": "system",
        "content": [{"type": "text", "text": "You are a helpful assistant."}]
    },
    {
        "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?"}
        ]
    }
]

output = pipe(text=messages, max_new_tokens=200)
print(output[0][0]["generated_text"][-1]["content"])
# Okay, let's take a look! 
# Based on the image, the animal on the candy is a **turtle**. 
# You can see the shell shape and the head and legs.

Running the model on a single / multi GPU

# pip install accelerate

from transformers import AutoProcessor, Gemma3ForConditionalGeneration
from PIL import Image
import requests
import torch

model_id = "google/gemma-3-12b-it"

model = Gemma3ForConditionalGeneration.from_pretrained(
    model_id, device_map="auto"
).eval()

processor = AutoProcessor.from_pretrained(model_id)

messages = [
    {
        "role": "system",
        "content": [{"type": "text", "text": "You are a helpful assistant."}]
    },
    {
        "role": "user",
        "content": [
            {"type": "image", "image": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg"},
            {"type": "text", "text": "Describe this image in detail."}
        ]
    }
]

inputs = processor.apply_chat_template(
    messages, add_generation_prompt=True, tokenize=True,
    return_dict=True, return_tensors="pt"
).to(model.device, dtype=torch.bfloat16)

input_len = inputs["input_ids"].shape[-1]

with torch.inference_mode():
    generation = model.generate(**inputs, max_new_tokens=100, do_sample=False)
    generation = generation[0][input_len:]

decoded = processor.decode(generation, skip_special_tokens=True)
print(decoded)

# **Overall Impression:** The image is a close-up shot of a vibrant garden scene, 
# focusing on a cluster of pink cosmos flowers and a busy bumblebee. 
# It has a slightly soft, natural feel, likely captured in daylight.

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

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

GPU в ailist

llama.cpp

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

GGUF-модель ждёт проверки: нужно выбрать файл кванта под доступные GPU.

Ревизия весов
555cc1f

0 моделей