/ Модель

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

Контекст
16 384 токена
Параметры
1,3 млрд
Архитектура
llama · dense
Базовая модель
deepseek-coder-1.3b-instruct
Библиотека
transformers
Опубликована
25 сен 2026

imagine-v8

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

Imagine v8 — дообученная компактная модель для локальной генерации SQL-запросов PostgreSQL с привязкой к заданной схеме базы данных.

734скачиваний за 30 дней1лайквеса обновлены25 сен 2026

Бенчмарки

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

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

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

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

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

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

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

Imagine v8 — компактная модель для генерации кода, разработанная и дообученная Interchained на основе deepseek-ai/deepseek-coder-1.3b-instruct. Она предназначена прежде всего для генерации SQL-запросов к PostgreSQL с опорой на схему базы данных, а также для рассуждений о структуре данных и локальной помощи в программировании. Модель содержит 1,3 млрд параметров, использует плотную архитектуру семейства Llama и поддерживает контекст до 16 384 токенов. Для запуска применяется Transformers; веса доступны в формате safetensors.

Imagine обучена выполнять задачи с доступной схемой: не придумывать таблицы и столбцы, учитывать неоднозначность запросов и придерживаться контракта только для чтения. Модель рассчитана на локальное или самостоятельное развёртывание. В README приведены результаты отдельной оценки чекпойнта линии v6, а не v8, поэтому их нельзя считать показателем качества этой версии. v8 обозначена как исследовательский чекпойнт; возможны ошибки в SQL, фильтрах и бизнес-смысле, а также отклонения от протокола. Сгенерированные запросы следует проверять, а безопасность обеспечивать правами доступа и проверками на стороне приложения. Лицензия в предоставленных данных не указана.

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

  • генерация SELECT-запросов PostgreSQL по вопросу на естественном языке
  • составление запросов с учётом переданной схемы таблиц
  • ответы на вопросы о данных через read-only SQL
  • уточнение неоднозначных запросов к базе данных
  • локальная помощь разработчику в задачах PostgreSQL

Ограничения

Модель может генерировать неверный SQL, ошибаться в фильтрах, сортировке и бизнес-смысле запроса или отклоняться от ожидаемого протокола; результаты нужно проверять. Оценка из README относится к чекпойнту линии v6, поэтому не подтверждает качество v8; лицензионные условия по предоставленным данным установить нельзя.

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

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

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

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

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

Открыть на Hugging Face

Imagine v8

Imagine is a compact local coding model built and fine-tuned by Interchained.

It is focused on PostgreSQL, schema-grounded text-to-SQL, database reasoning, and local-first deployment.

Imagine v8 is a research checkpoint based on deepseek-ai/deepseek-coder-1.3b-instruct.

What Imagine is for

Imagine is designed for:

  • PostgreSQL generation
  • schema-grounded text-to-SQL
  • database reasoning
  • read-only SQL workflows
  • local coding assistance
  • structured database tasks
  • local and self-hosted inference

Imagine is intentionally more focused than a general-purpose chatbot.

Identity

The deployed model identity is Imagine.

Imagine was built and fine-tuned by Interchained.

DeepSeek-Coder is part of the upstream model lineage, but the deployed model identity is Imagine.

Local-first

Imagine is intended to run locally on hardware controlled by the user.

Normal inference does not require a metered cloud inference API.

A larger teacher model may be used during research or curriculum generation, but Imagine does not require that teacher at runtime.

PostgreSQL specialization

Imagine is trained around PostgreSQL and schema-grounded query generation.

The project emphasizes whether generated SQL:

  1. parses correctly
  2. follows the read-only contract
  3. binds against the supplied schema
  4. executes successfully
  5. answers the requested question

The goal is not to match one reference SQL string exactly.

Different SQL queries can be semantically equivalent.

Read-only SQL contract

Imagine is trained for read-only database tasks.

Expected SQL includes:

SELECT ...

and read-only:

WITH ...
SELECT ...

The database-task contract excludes mutating and destructive statements such as:

  • INSERT
  • UPDATE
  • DELETE
  • MERGE
  • TRUNCATE
  • ALTER
  • DROP
  • CREATE
  • COPY

Production deployments should still enforce read-only access at the database-permission level.

Schema grounding

Imagine should use only the schema supplied in the prompt.

It should not invent:

  • tables
  • columns
  • relationships
  • foreign keys
  • join keys
  • identifiers

If the requested information cannot be derived from the supplied schema, Imagine should avoid fabricating an answer.

Depending on the request, the correct response may be UNANSWERABLE or a clarification request.

Ambiguity handling

Imagine is trained not to guess through material ambiguity.

If two reasonable interpretations would produce meaningfully different SQL or results, Imagine should ask for clarification rather than silently choosing one.

Output protocol

SQL tasks may use structured sentinel output:

<<<SQL>>>
SELECT ...
<<<END>>>

Unsupported requests may use:

<<<UNANSWERABLE>>>
...
<<<END>>>

Ambiguous requests may use clarification behavior rather than guessing.

Training

Imagine v8 was produced through iterative full fine-tuning.

The training path includes:

  • DeepSeek-Coder 1.3B Instruct base
  • PostgreSQL-focused supervised fine-tuning
  • execution-gated SQL curriculum generation
  • identity training
  • adversarial identity examples
  • schema-grounding examples
  • protocol-focused training
  • expanded system-contract training

The project uses real PostgreSQL execution as part of its evaluation and curriculum pipeline.

Execution gate

SQL can be checked through several levels:

Parse

The query must parse as PostgreSQL.

Safety

The query must satisfy the read-only contract.

Bind

The query must resolve successfully against the real supplied schema.

This catches nonexistent tables, nonexistent columns, ambiguous references, and related schema errors.

Execute

The query must execute successfully against PostgreSQL.

Result agreement

The result can be compared with a reference query.

Reference-result agreement is useful, but it is not identical to semantic correctness. A different projection or implementation may still answer the user's question correctly.

Evaluation

A held-out telemetry evaluation contains 21 PostgreSQL questions.

A checkpoint in the v6 lineage achieved:

  • 100% strict parse rate
  • 100% execute rate
  • 0 invented relations
  • 0 invented columns
  • 0 refusals
  • 15/21 strict reference-result agreements
  • 71.4% strict execution-agreement score

Some reference mismatches involved valid executable SQL that differed from the reference query in projection or implementation.

For that reason, Imagine research distinguishes between:

  • protocol compliance
  • PostgreSQL executability
  • exact result agreement
  • semantic correctness

Example

Prompt:

What is the average cpu_pct in samples?

Possible output:

<<<SQL>>>
SELECT AVG(cpu_pct) FROM samples;
<<<END>>>

Loading Imagine

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "Interchained/imagine-v8"

tokenizer = AutoTokenizer.from_pretrained(model_id)

model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)

messages = [
    {
        "role": "user",
        "content": "What model am I speaking with?"
    }
]

inputs = tokenizer.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_tensors="pt",
).to(model.device)

with torch.no_grad():
    output = model.generate(
        inputs,
        max_new_tokens=128,
        do_sample=False,
    )

response = tokenizer.decode(
    output[0][inputs["input_ids"].shape[-1]:],
    skip_special_tokens=True,
)

print(response)

Intended use

Imagine is intended for:

  • developers
  • database engineers
  • AI engineers
  • PostgreSQL users
  • text-to-SQL researchers
  • local-model experimentation

Limitations

Imagine v8 is a research checkpoint.

It may still:

  • generate incorrect SQL
  • misunderstand ambiguous requests
  • apply incorrect filters
  • choose incorrect ordering
  • misunderstand business semantics
  • deviate from the intended output protocol
  • produce incomplete answers
  • show residual behavior from the upstream base model

Generated SQL should be reviewed before use in important systems.

Security

Do not rely on model behavior alone for database safety.

Production systems should enforce controls such as:

  • read-only database roles
  • statement timeouts
  • row limits
  • query validation
  • schema restrictions
  • application-level authorization
  • audit logging

Project philosophy

Imagine is built around three ideas:

Grounding over guessing.
The supplied schema is the source of truth.

Execution over string similarity.
Correctness should be judged by what SQL actually does, not only whether it matches one reference string.

Local control over unnecessary dependency.
Useful coding models should be able to run on infrastructure controlled by the user.

Status

Imagine v8 — Research Checkpoint

Built and fine-tuned by Interchained.

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

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

0 моделей