FRIDA-Decisions-V2-1.8B

FRIDA-Decisions-V2-1.8B is a 16-layer dense BF16 decision model with a vision encoder. It scores candidate answers against a shared text or image input in Russian or English. It supports choice, ordinal scoring, yes/no decisions and ranking for latency-sensitive tasks such as routing, triage, classification and reranking.
Usage
We recommend vLLM with the FRIDA-Decisions V2 plugin for inference.
- Run vLLM for text and image requests over HTTP, including ranking with raw candidate scores.
- Use Transformers to score text and images directly in Python.
- Evaluation and serving performance describe the measured workloads.
Transformers
The decision pipeline in Transformers 5.24.1 loads the model code included with these weights. Install torchvision for image preprocessing. Use a separate Python environment for the vLLM server below.
python -m pip install 'transformers==5.24.1' accelerate pillow torch torchvision
from transformers import pipeline
decide = pipeline("decision", model="ai-forever/FRIDA-Decisions-V2-1.8B",
trust_remote_code=True, dtype="auto", device=0)
request = {
"state": "The sky is blue.",
"questions": {
"color": {"type": "choice", "instructions": "Pick the sky color.",
"criteria": {"blue": "blue", "red": "red"}},
"is_blue": {"type": "noul", "instructions": "Is the sky blue?"},
},
}
answers = decide(request)
print(answers["color"]["choice"], answers["is_blue"]["noul"])
Pass the request as a Python dictionary or its JSON string. For vision, put up
to 16 images in the top-level images list, in the order the model should read
them. Each entry accepts plain base64 or a base64 image data URI.
import base64
from pathlib import Path
image = base64.b64encode(Path("photo.jpg").read_bytes()).decode("ascii")
result = decide({"state": "", "images": [image], "questions": {
"sky": {"type": "noul", "instructions": "Does the image show a blue sky?"}
}})
print(result["sky"]["noul"])
The Transformers pipeline supports choice, score and noul. Supply at least
two options for each choice or two levels for each score. Larger candidate sets
share the same 32,768-position request budget. An ordinal score is the expected
level under the returned probabilities. For one raw score per candidate, use
ranking through the vLLM server below.
In Transformers inference, the model automatically reuses the state across
candidates in the same request once the state reaches 1,536 positions. The
count includes image patches and their delimiters. For shorter states, it
processes each candidate independently. With BF16 arithmetic the two paths
can produce slightly different scores, and closely matched candidates can
exchange places. For direct comparisons, pass use_shared_state=False to the
model's decide method to evaluate each candidate independently.
vLLM
The FRIDA-Decisions V2 plugin shares the state across candidates within a
request. The command below uses vLLM 0.32.0, Transformers 5.19.0 and FLA 0.6.0
in a Linux CUDA environment. Set FRIDA_WHEEL to the local path of the V2 plugin wheel
and MODEL_DIR to the local checkpoint directory. Both backends read the
same tensor shards. The command disables cross-request prefix caching.
python -m pip install "${FRIDA_WHEEL}[v2]"
export VLLM_PLUGINS=frida_decisions_v2
export FDD_FLAT_TEXT_PACK=parallel
python -m vllm.entrypoints.openai.api_server --model "$MODEL_DIR" --tokenizer "$MODEL_DIR/base" \
--hf-config-path "$MODEL_DIR/vllm_config.json" --config-format hf \
--served-model-name frida-decisions-v2-1.8b --runner pooling \
--io-processor-plugin frida_decisions_v2 --dtype bfloat16 \
--host 127.0.0.1 --enforce-eager \
--no-enable-chunked-prefill --no-enable-prefix-caching \
--max-model-len 32768 --max-num-batched-tokens 32768 \
--max-num-seqs 32 --gpu-memory-utilization 0.3
Wait for GET /health to return HTTP 200, then send questions under data.
The request's model field matches the server's --served-model-name.
curl --fail http://127.0.0.1:8000/pooling \
-H 'Content-Type: application/json' \
--data-binary @- <<'JSON'
{
"model": "frida-decisions-v2-1.8b",
"data": {
"state": "Не могу войти в личный кабинет: код подтверждения не приходит.",
"questions": {
"route": {
"type": "choice",
"instructions": "В какую команду направить обращение?",
"criteria": {
"support": "Вход в аккаунт и технические проблемы",
"billing": "Оплата, списания и возвраты"
}
},
"blocked": {
"type": "noul",
"instructions": "Пишет ли клиент, что не может войти в аккаунт?"
}
}
}
}
JSON
Read the selected team from data.answers.route.choice and the
probability of an affirmative answer from data.answers.blocked.noul.
The response also includes per-option data.margins and data.usage.
For a vision request, add data.images with base64-encoded images or image
data URLs and use data.state for any text that accompanies the images.
Question types
| Type | Input | Result |
|---|---|---|
choice | A map of option IDs to descriptions | Selected ID and option probabilities |
score | Ordered descriptions for the levels | Expected score on the scale from 0 to K−1 and level probabilities |
noul | A yes/no instruction with optional descriptions for true and false | Probability of yes |
ranking | A map of candidate IDs to descriptions | Ordered IDs, candidate scores and probabilities |
Evaluation
| Evaluation | Examples | Result |
|---|---|---|
| razvilka short, structured decisions | 735 | 90.5% |
| razvilka long, long-form text | 4,699 | 57.0% |
| razvilka vision, image and text | 4,030 | 75.2% |
| JevBench, English | 231 | 70.1% |
| Decision Index 0.3 public, excluding HLE | 110,007 | 45.95 |
The Decision Index number is from our own evaluation on 36 benchmarks,
using balanced_skill with HLE omitted and its weight redistributed within
its domain. The razvilka long and vision entries use evaluation snapshots
with the sizes above. The short score uses the 735-item razvilka benchmark.
Serving performance
Measurements use the hybrid vLLM plugin on one warmed H100. Single-request latency is the median (p50) HTTP response time for synthetic text with one choice question and eight options. Throughput uses the same 685 short text requests across variants in a closed-loop test. Estimating p99 for a deployment requires measuring at its target arrival rate and request-length distribution.
| Workload | FRIDA-Decisions-V2-1.8B |
|---|---|
| 1,000 / 4,000 / 10,000 state tokens, one request in flight | 25.1 / 41.5 / 99.2 ms |
| Short text, 8 / 32 requests in flight | 254.6 / 444.5 decisions/s |
Intended use and limitations
Results depend on the wording of instructions and candidate descriptions. Evaluate accuracy and thresholds on representative inputs before using scores to automate decisions. Input length, image size, candidate count, and concurrency affect latency and GPU memory. Both interfaces accept up to 32,768 packed positions for the entire request. This includes the shared state, all questions and options, separators, image positions and packing metadata.
License and attribution
Based on Qwen/Qwen3.5-2B, distributed upstream under Apache-2.0. This checkpoint contains pruned and fine-tuned weights. See the accompanying license and attribution files.