Text Generation
Transformers
Safetensors
Bengali
English
llama
bengali
bangla
language-model
causal-language-model
gqa
experimental
text-generation-inference
Instructions to use biltudas1/Lexicon-10M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use biltudas1/Lexicon-10M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="biltudas1/Lexicon-10M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("biltudas1/Lexicon-10M") model = AutoModelForCausalLM.from_pretrained("biltudas1/Lexicon-10M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use biltudas1/Lexicon-10M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "biltudas1/Lexicon-10M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "biltudas1/Lexicon-10M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/biltudas1/Lexicon-10M
- SGLang
How to use biltudas1/Lexicon-10M 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 "biltudas1/Lexicon-10M" \ --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": "biltudas1/Lexicon-10M", "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 "biltudas1/Lexicon-10M" \ --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": "biltudas1/Lexicon-10M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use biltudas1/Lexicon-10M with Docker Model Runner:
docker model run hf.co/biltudas1/Lexicon-10M
Lexicon-10M
Summary
Lexicon is an experimental language model project focused primarily on Bengali, with secondary support for English. It aims to develop lightweight conversational AI for everyday Bengali communication.
It uses a LLaMA-style decoder-only Transformer architecture with a custom tokenizer.
Model Details
| Property | Value |
|---|---|
| Parameters | 10.85M |
| Architecture | Decoder-only Transformer |
| Hidden Size | 256 |
| Intermediate Size | 320 |
| Layers | 6 |
| Attention Heads | 4 |
| Key-Value Heads | 2 |
| Attention | Grouped-Query Attention (GQA) |
| Positional Encoding | RoPE |
| Normalization | RMSNorm |
| Activation | SwiGLU |
| Context Length | 4,096 |
| Embeddings | Tied |
Tokenizer Details
- Type: Byte-Level BPE
- Vocabulary Size: 32,000
- Normalization: NFC
- Byte Fallback: Enabled
- Primary Language: Bengali
- Secondary Language: English
Loading the Model
Install the required dependencies:
pip install torch transformers safetensors
Load the model and tokenizer:
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "biltudas1/Lexicon-10M"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype=torch.float32
)
model.eval()
License
Licensed under the PolyForm Noncommercial License 1.0.0.
Commercial use requires separate permission from the copyright holder.
- Downloads last month
- 7