/ Модель

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

Контекст
262 144 токена
Лицензия
Apache 2.0
Архитектура
qwen3_5 · dense
Базовая модель
Qwen3.5-2B-Unloop
Библиотека
transformers
Опубликована
24 ноя 2026

OCC-RAG-2B

Генерация текстаТекст → текст
528скачиваний за 30 дней8лайковвеса обновлены28 ноя 2026

Описание модели

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

Дообученная 2-миллиардная языковая модель для обоснованных ответов на вопросы по найденным документам с цитатами и отказом при нехватке данных.

OCC-RAG-2B — языковая модель семейства Optimal Cognitive Core от OCC с 2 млрд параметров, дообученная на базе occ-ai/Qwen3.5-2B-Unloop. Она предназначена для ответов на вопросы по найденным документам: сопоставляет сведения из переданных фрагментов, оценивает, достаточно ли в них доказательств, и возвращает ответ в формате JSON с кратким ответом, объяснением и идентификаторами источников. Если нужных фактов в документах нет, модель может вернуть статус UNANSWERABLE.

Модель рассчитана на сценарии RAG, включая многошаговые вопросы и финансовые вопросы и ответы. По заявлению разработчика, в сравнении на семи задачах она в среднем превзошла Qwen3.5-4B и Qwen3.5-9B и показала результаты, сопоставимые с Qwen3.8-27B; эти оценки относятся к указанным в карточке бенчмаркам. Модель работает в режиме рассуждений, для которого разработчик рекомендует жадное декодирование. Поддерживаются английский и русский языки. Репозиторий содержит веса в формате safetensors, библиотека — Transformers. Лицензия — Apache-2.0.

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

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

Ограничения

Для качественного ответа нужно передавать релевантные документы; при нехватке сведений модель может вернуть UNANSWERABLE. Карточка рекомендует режим рассуждений и жадное декодирование; заявленные сравнительные результаты относятся к описанным бенчмаркам.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

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

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

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

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

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

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

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

Открыть на Hugging Face

OCC-RAG-2B

OCC-RAG-2B is a 2B-parameter language model in the Optimal Cognitive Core (OCC) family, specialized for faithful question answering over retrieved documents. Given a question and a set of passages, it reasons across the sources and decides whether they contain enough evidence to answer. It returns its answer in JSON with citations to the supporting passages, or an explicit UNANSWERABLE status when a necessary fact is missing.

With 2B parameters, OCC-RAG-2B outperforms Qwen3.5-4B and Qwen3.5-9B on average across seven tasks spanning multi-hop reasoning, financial question answering, and faithfulness to the supplied context. It is competitive with Qwen3.8-27B, a model over 13 times its size, and ranks first among the models compared on TAT-QA, the ConvFinQA subset of T²-RAGBench, and the single-hop split of ConFiQA.

We used OCC’s Qwen3.5-2B-Unloop as our base model.

Highlights

  • Faithful by design — Trained to follow the supplied passages even when they contradict a fact the model learned during pretraining.
  • Answers with citations — The JSON response includes a short answer, a fuller explanation and source IDs your application can link back to the original passages.
  • Fewer output tokens — Across the seven benchmark tasks, OCC-RAG-2B generates 468 tokens per response on average, 89% fewer than Qwen3.5-2B in thinking mode (4,281).

Evaluation

MuSiQue uses inclusion accuracy and ConFiQA uses exact match, both over all questions including refusals. For the FinQA and ConvFinQA subsets of T²-RAGBench, we supply the gold report page and use an LLM judge to score the answer. TAT-QA uses official F1. Scores are percentages.

Quickstart

Pass the question as plain text and the retrieved passages as documents, a list of dictionaries with a text field. The chat template numbers documents in the order supplied, so source ID 2 refers to documents[1]. Pass the documents with the final user message.

Both examples load the weights, tokenizer and document-aware chat template from this repository.

Recommended sampling parameters

[!TIP] OCC-RAG-2B supports thinking mode only. The supplied chat template opens <think> automatically; the model continues the reasoning, closes it with </think>, and then generates the final JSON answer.

Use greedy decoding, as in our benchmark runs.

  • Transformers: do_sample=False
  • vLLM: temperature=0.0. Start the server with --reasoning-parser qwen3 to return the reasoning separately from the JSON.

Transformers

Load the model and pass the question and documents directly to the tokenizer.

import json

import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer

model_path = "occ-ai/OCC-RAG-2B"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForImageTextToText.from_pretrained(
    model_path, dtype="auto", device_map="auto"
).eval()

messages = [{"role": "user", "content": "In which year did the archive open to the public?"}]
documents = [
    {"text": "The archive was founded in 1987 as a private collection."},
    {"text": "The archive opened its doors to the public in 1994."},
]
inputs = tokenizer.apply_chat_template(
    messages, documents=documents, add_generation_prompt=True,
    tokenize=True, return_dict=True, return_tensors="pt",
).to(model.device)
with torch.inference_mode():
    output = model.generate(**inputs, max_new_tokens=8192, do_sample=False, use_cache=True)

tokens = output[0, inputs.input_ids.shape[1]:].tolist()
if tokenizer.eos_token_id in tokens:
    tokens = tokens[:tokens.index(tokenizer.eos_token_id)]
completion = tokenizer.decode(tokens, skip_special_tokens=False)
answer = json.loads(completion.rsplit("</think>", 1)[-1].strip())
print(answer["answer"], answer["sources"])

vLLM

Start the server with the Qwen reasoning parser to separate the reasoning block from the final JSON.

vllm serve occ-ai/OCC-RAG-2B --reasoning-parser qwen3

Send documents as a request field and use response_format to constrain the final answer to the schema. vLLM structured outputs

from typing import Literal

from openai import OpenAI
from pydantic import BaseModel

class Answer(BaseModel):
    status: Literal["ANSWERABLE", "UNANSWERABLE"]
    sources: list[int]
    answer: str
    full_answer: str

question = "In which year did the archive open to the public?"
documents = [
    {"text": "The archive was founded in 1987 as a private collection."},
    {"text": "The archive opened its doors to the public in 1994."},
]

client = OpenAI(base_url="http://localhost:8000/v1", api_key="local")
response = client.chat.completions.create(
    model="occ-ai/OCC-RAG-2B",
    messages=[{"role": "user", "content": question}],
    extra_body={"documents": documents},
    response_format={
        "type": "json_schema",
        "json_schema": {"name": "answer", "schema": Answer.model_json_schema()},
    },
    temperature=0.0,
    max_tokens=8192,
)
choice = response.choices[0]
if choice.finish_reason != "stop" or not choice.message.content:
    raise ValueError("Incomplete answer")
result = Answer.model_validate_json(choice.message.content)
print(result.model_dump())

Example JSON response:

{
  "status": "ANSWERABLE",
  "sources": [2],
  "answer": "1994",
  "full_answer": "The archive opened to the public in 1994."
}

License

OCC-RAG-2B is released under the Apache 2.0 License. Its base model, Qwen3.5-2B-Unloop, is also licensed under Apache 2.0.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
Qwen3_5ForConditionalGeneration
Ревизия весов
60f2a7e

0 моделей