/ Модель

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

Параметры
4 млрд
Размер весов
8,6 ГБ
Лицензия
Apache 2.0
Архитектура
vedika_vyom · dense
Библиотека
transformers
Опубликована
26 авг 2026

Vedika-Vyom-4b-v1-mini

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

Vedika-Vyom-4b-v1-mini — диалоговая причинная языковая модель Veda Labs для генерации текста.

52скачиваний за 30 дней0лайковвеса обновлены26 авг 2026

Бенчмарки

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

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

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

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

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

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

Vedika-Vyom-4b-v1-mini — 4-миллиардная плотная причинная языковая модель от Veda Labs с собственной архитектурой трансформера. Она предназначена для генерации текста и диалогового общения. Модель включает 26 декодерных слоёв, RMSNorm, RoPE и групповое внимание GQA с 8 головами запросов и 4 головами ключей и значений; репозиторий содержит веса в формате safetensors и интеграцию с Transformers.

Карточка описывает реализацию архитектуры и совместимость с Hugging Face, но не приводит результатов оценки качества, длины контекста или подробностей о данных обучения. Для загрузки через AutoModelForCausalLM требуется включить trust_remote_code. Лицензия — Apache 2.0.

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

  • генерация продолжений текста
  • создание диалогового чат-бота
  • ответы на текстовые запросы
  • локальные эксперименты с причинными языковыми моделями

Ограничения

Карточка не сообщает результаты сравнительных оценок, данные обучения и длину контекста. Для загрузки через Transformers требуется trust_remote_code.

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

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

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

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

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

Открыть на Hugging Face

Vedika-Vyom-4b-v1-mini

License Python Transformers Veda Labs

A Custom Architecture Implementation by Veda Labs

Website | Hugging Face | GitHub | X (Twitter)


Table of Contents


Overview

Vedika-Vyom-4b-v1-mini is a custom transformer architecture developed by Veda Labs. This project provides a clean, standalone PyTorch implementation featuring advanced components including RMSNorm normalization, Rotary Position Embeddings (RoPE), and grouped query attention mechanisms optimized for efficient text generation.

Key Features

  • ✅ Custom Architecture: From-scratch implementation of all core transformer components
  • ✅ Advanced Normalization: RMSNorm layers for stable training and inference
  • ✅ Rotary Embeddings: RoPE for superior positional encoding
  • ✅ Grouped Query Attention: Efficient GQA mechanism with 8 attention heads and 4 KV heads
  • ✅ Hugging Face Integration: Seamless auto-registration with AutoConfig and AutoModelForCausalLM
  • ✅ Standalone Portability: Runs with trust_remote_code=True without external dependencies
  • ✅ Clean API: Intuitive module design following Hugging Face conventions

Model Information

PropertyValue
Model NameVedika-Vyom-4b-v1-mini
OrganizationVeda Labs
ArchitectureCustom Causal Language Model
Parameters~4 Billion
LicenseApache 2.0
TaskText Generation (Causal LM)

Custom Architecture

This repository implements a complete custom architecture for Vedika-Vyom-4b-v1-mini with the following core components:

ComponentDescription
VedikaVyomConfigConfiguration class defining model hyperparameters
VedikaVyomRMSNormRoot Mean Square Layer Normalization
VedikaVyomRotaryEmbeddingRotary Position Embeddings (RoPE)
VedikaVyomMLPFeed-forward network with gate projections
VedikaVyomAttentionMulti-head attention with grouped query attention (GQA)
VedikaVyomDecoderLayerSingle transformer decoder block
VedikaVyomModelCore transformer model with embedding and layers
VedikaVyomForCausalLMCausal language model head for text generation

All components are natively designed as part of the Vedika-Vyom architecture, ensuring optimal performance and numerical precision.


Installation

Prerequisites

  • Python 3.9+
  • PyTorch 2.0+
  • Transformers 4.50.0+

Install Dependencies

pip install torch>=2.0.0
pip install transformers>=4.50.0
pip install accelerate  # Optional, for multi-GPU support

Clone Repository (Optional)

git clone https://github.com/vedalabs-tech/vedika-vyom-4b-v1-mini.git
cd vedika-vyom-4b-v1-mini

Quickstart

Loading the Model

The model can be loaded directly from Hugging Face Hub using AutoTokenizer and AutoModelForCausalLM with trust_remote_code=True:

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

# Model identifier
model_id = "Veda-Labs/Vedika-Vyom-4b-v1-mini"

# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)

# Load model
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    device_map="auto"  # Automatically move model to GPU if available
)

model.eval()

Running Inference

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

# Initialize
model_id = "Veda-Labs/Vedika-Vyom-4b-v1-mini"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    device_map="cuda"
)

# Prepare input
prompt = "Explain the concept of quantum entanglement in simple terms."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

# Generate
with torch.inference_mode():
    outputs = model.generate(
        **inputs,
        max_new_tokens=256,
        do_sample=True,
        temperature=0.7,
        top_p=0.95,
        repetition_penalty=1.1
    )

# Decode output
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)

Batch Inference Example

prompts = [
    "What is the capital of France?",
    "Write a haiku about artificial intelligence.",
    "Explain Newton's third law of motion."
]

inputs = tokenizer(prompts, return_tensors="pt", padding=True).to(model.device)

with torch.inference_mode():
    outputs = model.generate(
        **inputs,
        max_new_tokens=128,
        do_sample=False
    )

for i, prompt in enumerate(prompts):
    print(f"\nPrompt: {prompt}")
    print(f"Response: {tokenizer.decode(outputs[i], skip_special_tokens=True)}")

Architecture Details

Model Configuration

The VedikaVyomConfig class defines the following key hyperparameters for the Vedika-Vyom architecture:

VedikaVyomConfig(
    vocab_size=256000,        # Vocabulary size
    hidden_size=2048,         # Hidden dimension
    intermediate_size=8192,   # MLP intermediate dimension
    num_hidden_layers=26,     # Number of transformer layers
    num_attention_heads=8,    # Number of attention heads
    num_key_value_heads=4,    # Number of KV heads (GQA)
    head_dim=256,             # Head dimension
    rms_norm_eps=1e-6,        # RMSNorm epsilon
    max_position_embeddings=131072,  # Max context length (128K)
    rope_theta=1000000.0,     # RoPE theta
    hidden_act="gelu_pytorch_tanh"  # Activation function
)

Layer Structure

Each VedikaVyomDecoderLayer contains:

  1. Input LayerNorm (input_layernorm): Pre-normalization before attention using RMSNorm
  2. Self-Attention (self_attn): Multi-head attention with RoPE and Grouped Query Attention (GQA)
  3. Post-Attention LayerNorm (post_attention_layernorm): Pre-normalization before MLP using RMSNorm
  4. MLP (mlp): Gate-up-down projection network with GELU activation

The full model stack consists of:

  • Token embeddings (embed_tokens)
  • 26 decoder layers with native RMSNorm and RoPE
  • Final normalization (norm)
  • Language model head (lm_head)

Core Components

  • RMSNorm: Root Mean Square normalization for improved training stability
  • RoPE: Rotary Position Embeddings enabling excellent length extrapolation
  • GQA: Grouped Query Attention with 8 query heads and 4 key-value heads for efficient inference
  • SwiGLP-style MLP: Gate-projected feed-forward networks for enhanced expressivity

Weight Mapping

The custom architecture includes a built-in weight conversion utility that transparently maps checkpoint keys to the VedikaVyom parameter names.

Automatic Conversion

When loading from a compatible checkpoint, the following mapping is applied automatically:

Original Key PatternVedikaVyom Key Pattern
model.embedder.weightmodel.embed_tokens.weight
model.layers.{i}.attention_layer.norm.weightmodel.layers.{i}.input_layernorm.weight
model.layers.{i}.attention_layer.attn.q_proj.weightmodel.layers.{i}.self_attn.q_proj.weight
model.layers.{i}.attention_layer.attn.k_proj.weightmodel.layers.{i}.self_attn.k_proj.weight
model.layers.{i}.attention_layer.attn.v_proj.weightmodel.layers.{i}.self_attn.v_proj.weight
model.layers.{i}.attention_layer.attn.output_proj.weightmodel.layers.{i}.self_attn.o_proj.weight
model.layers.{i}.feed_forward_layer.norm.weightmodel.layers.{i}.post_attention_layernorm.weight
model.layers.{i}.feed_forward_layer.linear_gate.weightmodel.layers.{i}.mlp.gate_proj.weight
model.layers.{i}.feed_forward_layer.linear.weightmodel.layers.{i}.mlp.up_proj.weight
model.layers.{i}.feed_forward_layer.linear_out.weightmodel.layers.{i}.mlp.down_proj.weight
model.final_norm.weightmodel.norm.weight
logits_dense.weightlm_head.weight

Manual Weight Conversion (Optional)

If you need to convert weights manually:

from vedika_vyom import convert_checkpoint_to_vedikavyom

# Convert state dict
original_state_dict = torch.load("checkpoint.pt")
converted_state_dict = convert_checkpoint_to_vedikavyom(original_state_dict)

# Save converted weights
torch.save(converted_state_dict, "vedikavyom_weights.pt")

Verification

The implementation has been verified to produce consistent logits (within floating-point tolerance) across different runs with identical inputs and weights.


Citation

If you use Vedika-Vyom-4b-v1-mini in your research or applications, please cite:

@misc{vedika-vyom-4b-v1-mini,
  title={Vedika-Vyom-4b-v1-mini: A Custom Architecture for Efficient Text Generation},
  author={Veda Labs Team},
  year={2025},
  url={https://huggingface.co/Veda-Labs/Vedika-Vyom-4b-v1-mini}
}

Contact & Links

Official Resources

PlatformLink
Websitehttps://vedalabs.online
Hugging Face Profilehttps://huggingface.co/Veda-Labs
Model Repositoryhttps://huggingface.co/Veda-Labs/Vedika-Vyom-4b-v1-mini
GitHubhttps://github.com/vedalabs-tech
X (Twitter)https://x.com/VedaLabsAI

Support


Built with ❤️ by Veda Labs

Licensed under Apache 2.0

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

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

GPU в ailist

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

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

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

0 моделей