Instructions to use aakashMeghwar01/SindhiLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aakashMeghwar01/SindhiLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aakashMeghwar01/SindhiLM")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aakashMeghwar01/SindhiLM") model = AutoModelForCausalLM.from_pretrained("aakashMeghwar01/SindhiLM") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use aakashMeghwar01/SindhiLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aakashMeghwar01/SindhiLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aakashMeghwar01/SindhiLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aakashMeghwar01/SindhiLM
- SGLang
How to use aakashMeghwar01/SindhiLM 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 "aakashMeghwar01/SindhiLM" \ --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": "aakashMeghwar01/SindhiLM", "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 "aakashMeghwar01/SindhiLM" \ --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": "aakashMeghwar01/SindhiLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use aakashMeghwar01/SindhiLM with Docker Model Runner:
docker model run hf.co/aakashMeghwar01/SindhiLM
SindhiLM: A Specialized GPT-2 Model for Sindhi
SindhiLM is a causal language model trained from scratch to provide high-quality text generation for the Sindhi language. It significantly outperforms general multilingual models by focusing specifically on Sindhi morphology and syntax.
Model Details
- Developed by: Aakash Meghwar
- Model type: Causal Language Model (GPT-2 architecture)
- Language: Sindhi (sd)
- Library Name: Transformers
- Base Model: openai-community/gpt2
Evaluation Results
The model was evaluated using Perplexity (PPL) on a held-out Sindhi test set. Lower perplexity indicates a better understanding of the language.
| Model | Perplexity (Lower is Better) |
|---|---|
| mBERT (Baseline) | 2,360,312 |
| GPT-2 (Base) | 500,000 |
| SindhiLM (Ours) | 212,503 |
Training Data
The model was trained on the Sindhi Mega Corpus, consisting of approximately 118 million tokens. This dataset includes diverse Sindhi literature, news, and web content.
How to Get Started
You can use this model directly with the Hugging Face transformers library:
from transformers import pipeline
# Load the model
generator = pipeline("text-generation", model="aakashMeghwar01/SindhiLM")
# Generate Sindhi text
prompt = "سنڌ جي ثقافت"
output = generator(prompt, max_new_tokens=20, do_sample=True, temperature=0.7)
print(output[0]['generated_text'])
- Downloads last month
- 11
Model tree for aakashMeghwar01/SindhiLM
Base model
openai-community/gpt2