You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Vedika-Vyom-31B-v2 Banner

Vedika-Vyom-31B-v2

A powerful multimodal AI model developed by Veda Labs in India.

Hugging Face | GitHub | Website | X (Twitter)
License: Apache 2.0 | Developed by: Veda Labs

Overview

Vedika-Vyom-31B-v2 is a state-of-the-art multimodal AI model developed by Veda Labs in India. This model is capable of handling text and image inputs, generating high-quality text outputs with advanced reasoning capabilities. Built on a robust architecture, Vedika-Vyom-31B-v2 delivers exceptional performance across a wide range of tasks including text generation, coding, reasoning, and multimodal understanding.

Key Features

  • Advanced Reasoning – Configurable thinking modes for complex problem-solving and step-by-step reasoning.
  • Multimodal Capabilities – Processes text and images with variable aspect ratio and resolution support.
  • Extended Context Window – Supports up to 256K tokens for deep context understanding.
  • Multilingual Support – Capable of understanding and generating content in over 140 languages.
  • Optimized Architecture – Hybrid attention mechanism with sliding window and full global attention layers.
  • Function Calling – Native support for structured tool use and agentic workflows.
  • Code Generation – Advanced capabilities for code generation, completion, and debugging.

Model Specifications

Property Value
Model Name Vedika-Vyom-31B-v2
Total Parameters 30.7B
Architecture Dense Transformer with Hybrid Attention
Layers 60
Sliding Window 1024 tokens
Context Length 256K tokens
Vocabulary Size 262K
Supported Modalities Text, Image
Vision Encoder ~550M parameters

Core Capabilities

Vedika-Vyom-31B-v2 handles a broad range of tasks across text and vision:

  • Thinking Mode – Built-in reasoning mode that enables step-by-step thinking before answering.
  • Long Context Understanding – Process documents and conversations up to 256K tokens.
  • Image Understanding – Object detection, document/PDF parsing, chart comprehension, OCR (including multilingual), and handwriting recognition.
  • Interleaved Multimodal Input – Freely mix text and images in any order within a single prompt.
  • Function Calling – Native support for structured tool use, enabling autonomous agent workflows.
  • Coding – Code generation, completion, debugging, and explanation.
  • Multilingual – Support for 35+ languages out-of-the-box, pre-trained on 140+ languages.

Getting Started

Installation

To use Vedika-Vyom-31B-v2, install the required dependencies:

pip install -U transformers torch accelerate

Basic Usage

Loading the Model

from transformers import AutoProcessor, AutoModelForMultimodalLM

MODEL_ID = "vedalabs-tech/Vedika-Vyom-31B-v2"

# Load model and processor
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
    MODEL_ID,
    dtype="auto",
    device_map="auto"
)

Text Generation

# Create conversation messages
messages = [
    {"role": "system", "content": "You are Vedika-Vyom-31B-v2, an AI developed by Veda Labs in India."},
    {"role": "user", "content": "Write a short joke about programming."},
]

# Process input
inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
    add_generation_prompt=True,
    enable_thinking=False
).to(model.device)

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

# Generate output
outputs = model.generate(**inputs, max_new_tokens=1024)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)

# Parse and print response
parsed = processor.parse_response(response, prefix=inputs["input_ids"])
print(parsed)

Enabling Thinking Mode

To enable reasoning/thinking mode, set enable_thinking=True:

inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
    add_generation_prompt=True,
    enable_thinking=True  # Enable thinking mode
).to(model.device)

Image Processing

from transformers import AutoProcessor, AutoModelForMultimodalLM

MODEL_ID = "vedalabs-tech/Vedika-Vyom-31B-v2"

# Load model
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
    MODEL_ID, 
    dtype="auto", 
    device_map="auto"
)

# Prompt with image
messages = [
    {
        "role": "user", 
        "content": [
            {"type": "image", "url": "https://example.com/image.png"},
            {"type": "text", "text": "What is shown in this image?"}
        ]
    }
]

# Process input
inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
    add_generation_prompt=True,
).to(model.device)

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

# Generate output
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)

# Parse output
processor.parse_response(response, prefix=inputs["input_ids"])

Video Processing

from transformers import AutoProcessor, AutoModelForMultimodalLM

MODEL_ID = "vedalabs-tech/Vedika-Vyom-31B-v2"

# Load model
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
    MODEL_ID, 
    dtype="auto", 
    device_map="auto"
)

# Prompt with video
messages = [
    {
        'role': 'user',
        'content': [
            {"type": "video", "video": "https://example.com/video.mp4"},
            {'type': 'text', 'text': 'Describe this video.'}
        ]
    }
]

# Process input
inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
    add_generation_prompt=True,
).to(model.device)

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

# Generate output
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)

# Parse output
processor.parse_response(response, prefix=inputs["input_ids"])

Best Practices

Sampling Parameters

For optimal performance, use the following sampling configuration:

  • temperature=1.0
  • top_p=0.95
  • top_k=64

Thinking Mode Configuration

Control the thinking process using these tokens:

  • Enable Thinking: Include the <|think|> token at the start of the system prompt.
  • Disable Thinking: Remove the <|think|> token from the prompt.

When thinking is enabled, the model outputs internal reasoning followed by the final answer:

<|channel>thought
[Internal reasoning steps]
<channel|>[Final answer]

Image Resolution Control

Vedika-Vyom-31B-v2 supports variable image resolution through configurable visual token budgets:

  • Higher token budget: Preserves more visual detail (slower inference)
  • Lower token budget: Faster inference for simpler tasks

System Prompt Identity

The model is configured with a concise system prompt to maintain its identity:

You are Vedika-Vyom-31B-v2, an AI developed by Veda Labs in India.

This ensures the model maintains consistent identity without hallucinating previous identities.

Safety & Responsibility

Vedika-Vyom-31B-v2 was developed with safety as a priority. The model undergoes rigorous evaluations to prevent harmful content generation, including:

  • Hate speech and harassment prevention
  • Sexually explicit content filtering
  • Dangerous content mitigation
  • Medical misinformation reduction
  • PII (Personally Identifiable Information) protection

Connect with Us

Stay connected with Veda Labs and explore more of our work:

Platform Link
Website vedalabs.online
Hugging Face vedalabs-tech
GitHub vedalabs-tech
X (Twitter) VedaLabsAI
Email vedalabs.veda@gmail.com

Citation

If you use Vedika-Vyom-31B-v2 in your research, please cite:

@misc{vedalabs2024vedikavyom,
      title={Vedika-Vyom-31B-v2: A Multimodal AI Model},
      author={Veda Labs AI Team},
      year={2024},
      publisher={Veda Labs}
}

License

This model is released under the Apache 2.0 License. See the LICENSE file for details.


© 2024 Veda Labs. All rights reserved. | Developed in India 🇮🇳

Downloads last month
-
Safetensors
Model size
31B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using Veda-Labs/Vedika-Vyom-31B-v2 1