Text Generation
Transformers
Safetensors
English
pragya_e2
small-language-model
from-scratch
causal-lm
decoder-only
gqa
rope
swiglu
exclusive-gated-attention
engram
custom_code
Instructions to use RuVI-AI/Pragya-EXP2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RuVI-AI/Pragya-EXP2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RuVI-AI/Pragya-EXP2", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("RuVI-AI/Pragya-EXP2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RuVI-AI/Pragya-EXP2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RuVI-AI/Pragya-EXP2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RuVI-AI/Pragya-EXP2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/RuVI-AI/Pragya-EXP2
- SGLang
How to use RuVI-AI/Pragya-EXP2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "RuVI-AI/Pragya-EXP2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RuVI-AI/Pragya-EXP2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "RuVI-AI/Pragya-EXP2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RuVI-AI/Pragya-EXP2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use RuVI-AI/Pragya-EXP2 with Docker Model Runner:
docker model run hf.co/RuVI-AI/Pragya-EXP2
File size: 1,232 Bytes
53e1201 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | {
"architectures": [
"PragyaForCausalLM"
],
"auto_map": {
"AutoConfig": "configuration_pragya.PragyaConfig",
"AutoModelForCausalLM": "modeling_pragya.PragyaForCausalLM"
},
"bias": false,
"block_size": 1024,
"d_rope": null,
"dropout": 0.0,
"engram_compressed_vocab": 9807,
"engram_embed_per_ngram": 128,
"engram_kernel_size": 4,
"engram_layer_ids": [
1,
8
],
"engram_max_ngram": 3,
"engram_n_heads": 4,
"engram_seed": 0,
"engram_vocab_size": [
4096,
4096
],
"ffn_mult": 2,
"gen_headroom": 128,
"gpt_top_k": 64,
"gradient_checkpointing": false,
"int8_group_size": 128,
"max_gen_tokens": 1024,
"mod_budget_coeff": 0.05,
"mod_capacity": 0.25,
"mod_gate_entropy_coeff": 0.0,
"mod_hard_eval": false,
"model_type": "pragya_e2",
"moe_fixed_capacity": null,
"moe_top_k": 2,
"mtp_depth": 1,
"mtp_lambda": 0.1,
"n_embd": 384,
"n_experts": 8,
"n_head": 12,
"n_layer": 16,
"n_shared": 1,
"num_kv_heads": 6,
"pattern": "dense",
"sliding_window_size": 512,
"tp_size": 1,
"transformers_version": "5.20.1",
"use_engram": true,
"use_int8": false,
"use_moe": false,
"use_mtp": false,
"use_nvfp4": false,
"vocab_size": 12288
} |