[!Note] This repository contains model weights and configuration files for Verus-0.8b in the Hugging Face Transformers format.These artifacts are compatible with Hugging Face Transformers, vLLM, SGLang, llama.cpp (GGUF export), and other major inference frameworks.In light of its parameter scale, the primary intended use cases are UI-to-Code translation, Diagram-to-Implementation scaffolding, Fill-in-the-Middle code completion, code review assistance, and task-specific fine-tuning.
<|fim_prefix|>, <|fim_middle|>, <|fim_suffix|>) enables accurate single-line and multi-line code infilling — a critical capability for IDE integration and copilot-style workflows.<|im_start|> / <|im_end|>)| Property | Value |
|---|---|
| Parameters | ~0.8B |
| Hidden Dimension | 1024 |
| Number of Layers | 24 |
| Attention Heads (Q / KV) | 16 / 8 (GQA) |
| Head Dimension | 64 |
| FFN Intermediate Dimension | 3,584 |
| FFN Activation | SwiGLU |
| Sliding Window Size | 4,096 tokens |
| RoPE Theta | 1,000,000 |
| RMS Norm Epsilon | 1e-5 |
| Vocabulary Size | 32,064 |
| Context Length | 125,000 tokens |
| Property | Value |
|---|---|
| Architecture | ViT-L/14 (CLIP) |
| Input Resolution | 336 × 336 px |
| Patch Size | 14 × 14 px |
| Number of Layers | 24 |
| Hidden Size | 1,024 |
| Intermediate Size | 4,096 |
| Attention Heads | 16 |
| Activation | QuickGELU |
| Feature Extraction Layer | -2 (penultimate) |
| Property | Value |
|---|---|
| Architecture | LlavaNextForConditionalGeneration |
| Projector Activation | GELU |
| Image Token Index | 32000 |
| Multi-Resolution Grid Pinpoints | [336×672], [672×336], [672×672], [1008×336], [336×1008] |
| Vision Feature Strategy | default (patch tokens only) |
| Token | ID | Purpose |
|---|---|---|
<|image|> | 32000 | Image placeholder (LLaVA-Next standard) |
<|im_start|> | 32001 | ChatML turn start |
<|im_end|> | 32002 | ChatML turn end / EOS |
<|vision_start|> | 32003 | Vision sequence boundary open |
<|vision_end|> | 32004 | Vision sequence boundary close |
<|image_pad|> | 32005 | Vision token padding |
<|fim_prefix|> | 32006 | FIM: prefix sentinel |
<|fim_middle|> | 32007 | FIM: infill target sentinel |
<|fim_suffix|> | 32008 | FIM: suffix sentinel |
<|fim_pad|> | 32009 | FIM: padding |
<|endoftext|> | 32010 | Generic end-of-document |
pip install "transformers>=4.52.0" accelerate pillow requests torch1from transformers import LlavaNextForConditionalGeneration, AutoProcessor
2import torch
3
4MODEL_ID = "8F-ai/Verus-0.8b"
5
6processor = AutoProcessor.from_pretrained(MODEL_ID)
7model = LlavaNextForConditionalGeneration.from_pretrained(
8 MODEL_ID,
9 torch_dtype=torch.bfloat16,
10 device_map="auto",
11)
12model.eval()
13
14messages = [
15 {
16 "role": "user",
17 "content": "Write a Python async context manager that manages a PostgreSQL connection pool using asyncpg."
18 }
19]
20
21text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
22inputs = processor(text=text, return_tensors="pt").to(model.device)
23
24with torch.inference_mode():
25 generated_ids = model.generate(**inputs, max_new_tokens=2048)
26
27output = processor.decode(generated_ids[0][len(inputs.input_ids[0]):], skip_special_tokens=True)
28print(output)1from transformers import LlavaNextForConditionalGeneration, LlavaNextProcessor
2from PIL import Image
3import requests
4import torch
5from io import BytesIO
6
7MODEL_ID = "8F-ai/Verus-0.8b"
8
9# ── Load model & processor ────────────────────────────────────────────────────
10processor = LlavaNextProcessor.from_pretrained(MODEL_ID)
11model = LlavaNextForConditionalGeneration.from_pretrained(
12 MODEL_ID,
13 torch_dtype=torch.bfloat16,
14 device_map="auto",
15)
16model.eval()
17
18# ── Load image ────────────────────────────────────────────────────────────────
19# From URL:
20response = requests.get("https://example.com/ui_mockup.png")
21image = Image.open(BytesIO(response.content)).convert("RGB")
22# From disk: image = Image.open("./mockup.png").convert("RGB")
23
24# ── Build multimodal conversation ─────────────────────────────────────────────
25messages = [
26 {
27 "role": "system",
28 "content": "You are Verus, an expert UI-to-Code assistant. Convert UI images into clean, production-ready code.",
29 },
30 {
31 "role": "user",
32 "content": [
33 {"type": "image"},
34 {
35 "type": "text",
36 "text": (
37 "Convert this UI mockup to a React functional component using Tailwind CSS. "
38 "Include all interactive states (hover, focus, disabled), responsive breakpoints "
39 "(sm / md / lg), and export as default."
40 ),
41 },
42 ],
43 },
44]
45
46# ── Tokenize ──────────────────────────────────────────────────────────────────
47text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
48inputs = processor(text=text, images=image, return_tensors="pt").to(model.device)
49
50# ── Generate ──────────────────────────────────────────────────────────────────
51with torch.inference_mode():
52 generated_ids = model.generate(
53 **inputs,
54 max_new_tokens=4096,
55 temperature=0.1,
56 top_p=0.95,
57 repetition_penalty=1.1,
58 )
59
60# ── Decode ────────────────────────────────────────────────────────────────────
61output = processor.decode(
62 generated_ids[0][len(inputs.input_ids[0]):],
63 skip_special_tokens=True,
64 clean_up_tokenization_spaces=False,
65)
66print(output)1from transformers import LlavaNextForConditionalGeneration, AutoProcessor
2import torch
3
4MODEL_ID = "8F-ai/Verus-0.8b"
5
6processor = AutoProcessor.from_pretrained(MODEL_ID)
7model = LlavaNextForConditionalGeneration.from_pretrained(
8 MODEL_ID,
9 torch_dtype=torch.bfloat16,
10 device_map="auto",
11)
12model.eval()
13
14# FIM format: <|fim_prefix|>{prefix}<|fim_suffix|>{suffix}<|fim_middle|>
15prefix = """def calculate_statistics(data: list[float]) -> dict:
16 \"\"\"Calculate descriptive statistics for a list of floats.\"\"\"
17 if not data:
18 raise ValueError("Input list must not be empty")
19 n = len(data)
20 mean = sum(data) / n
21"""
22
23suffix = """
24 return {
25 "n": n,
26 "mean": mean,
27 "variance": variance,
28 "std_dev": std_dev,
29 "min": min(data),
30 "max": max(data),
31 }
32"""
33
34fim_prompt = f"<|fim_prefix|>{prefix}<|fim_suffix|>{suffix}<|fim_middle|>"
35
36inputs = processor(text=fim_prompt, return_tensors="pt").to(model.device)
37
38with torch.inference_mode():
39 generated_ids = model.generate(**inputs, max_new_tokens=256, temperature=0.1)
40
41completion = processor.decode(
42 generated_ids[0][len(inputs.input_ids[0]):],
43 skip_special_tokens=True,
44)
45print(completion)1from transformers import LlavaNextForConditionalGeneration, LlavaNextProcessor
2from PIL import Image
3import torch
4
5MODEL_ID = "8F-ai/Verus-0.8b"
6
7processor = LlavaNextProcessor.from_pretrained(MODEL_ID)
8model = LlavaNextForConditionalGeneration.from_pretrained(
9 MODEL_ID, torch_dtype=torch.bfloat16, device_map="auto"
10)
11model.eval()
12
13image = Image.open("./aws_architecture.png").convert("RGB")
14
15messages = [
16 {
17 "role": "user",
18 "content": [
19 {"type": "image"},
20 {
21 "type": "text",
22 "text": "Generate a complete Terraform configuration for all AWS services shown in this architecture diagram. Include VPC, subnets, security groups, and IAM roles.",
23 },
24 ],
25 }
26]
27
28text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
29inputs = processor(text=text, images=image, return_tensors="pt").to(model.device)
30
31with torch.inference_mode():
32 generated_ids = model.generate(**inputs, max_new_tokens=4096)
33
34output = processor.decode(generated_ids[0][len(inputs.input_ids[0]):], skip_special_tokens=True)
35print(output)1from transformers import LlavaNextForConditionalGeneration, LlavaNextProcessor, BitsAndBytesConfig
2import torch
3
4quantization_config = BitsAndBytesConfig(
5 load_in_4bit=True,
6 bnb_4bit_compute_dtype=torch.bfloat16,
7 bnb_4bit_use_double_quant=True,
8 bnb_4bit_quant_type="nf4",
9)
10
11processor = LlavaNextProcessor.from_pretrained("8F-ai/Verus-0.8b")
12model = LlavaNextForConditionalGeneration.from_pretrained(
13 "8F-ai/Verus-0.8b",
14 quantization_config=quantization_config,
15 device_map="auto",
16)| Metric | 128K (base max) | 125K (Verus) | Delta |
|---|---|---|---|
| Peak KV-cache (bfloat16, 1 image) | ~6.40 GB | ~6.25 GB | −2.3% |
| Throughput (tok/s, RTX 4090) | ~880 | ~920 | +4.5% |
| Max stable batch size (8 GB VRAM) | 1 | 2 | +100% |
| Effective code reasoning capacity | ✅ | ✅ | No change |
| Use Case | Input | Output |
|---|---|---|
| UI Screenshot → Frontend | Figma / screenshot PNG | React + Tailwind TSX |
| Wireframe → Component | Hand-drawn sketch photo | Accessible HTML / SwiftUI |
| ERD → SQL Schema | Entity-relationship diagram | PostgreSQL DDL |
| Architecture Diagram → IaC | AWS / GCP / Azure diagram | Terraform HCL / Pulumi |
| Flowchart → Business Logic | BPMN / flowchart PNG | Python / TypeScript function |
| FIM Code Completion | Prefix + suffix context | Infilled code block |
| Long-Context Code Review | Entire repo file tree (up to ~90K tokens) | Inline suggestions |
1@misc{verus2025,
2 title = {Verus-0.8b: A Compact Multimodal Coding Assistant with LLaVA-Next Architecture and Fill-in-the-Middle Support},
3 author = {8F-ai},
4 year = {2026},
5 howpublished = {\url{https://huggingface.co/8F-ai/Verus-0.8b}},
6 note = {Apache 2.0 License}
7}