Instructions to use dehanalkautsar/gpt2-ne-wikimulti with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dehanalkautsar/gpt2-ne-wikimulti with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dehanalkautsar/gpt2-ne-wikimulti")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dehanalkautsar/gpt2-ne-wikimulti") model = AutoModelForCausalLM.from_pretrained("dehanalkautsar/gpt2-ne-wikimulti", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dehanalkautsar/gpt2-ne-wikimulti with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dehanalkautsar/gpt2-ne-wikimulti" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dehanalkautsar/gpt2-ne-wikimulti", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dehanalkautsar/gpt2-ne-wikimulti
- SGLang
How to use dehanalkautsar/gpt2-ne-wikimulti 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 "dehanalkautsar/gpt2-ne-wikimulti" \ --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": "dehanalkautsar/gpt2-ne-wikimulti", "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 "dehanalkautsar/gpt2-ne-wikimulti" \ --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": "dehanalkautsar/gpt2-ne-wikimulti", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dehanalkautsar/gpt2-ne-wikimulti with Docker Model Runner:
docker model run hf.co/dehanalkautsar/gpt2-ne-wikimulti
GPT-2 Nepali WikiMulti
GPT-2-small model pretrained from scratch on the Nepali portion of WikiMulti.
Dataset
- Dataset:
dehanalkautsar/WikiMulti - File:
20260801_ne_wiki.parquet - Training field:
text
Architecture
Standard GPT-2-small architecture:
- Layers: 12
- Hidden size: 768
- Attention heads: 12
- Maximum context: 1024
- Vocabulary size: 43846
All GPT-2 weights were initialized from scratch.
No pretrained GPT-2 model weights were used.
Tokenizer
A separate Byte-Level BPE tokenizer was trained from scratch using only the Nepali training split.
The original English GPT-2 vocabulary and BPE merge rules were not used.
Vocabulary size: 43846
Training
- GPU: NVIDIA RTX A6000
- Precision: FP16
- TF32: True
- Maximum epochs: 50
- Batch size per GPU: 8
- Gradient accumulation: 4
- Sequence length: 1024
- Learning rate: 5e-05
- Scheduler: linear
- Validation frequency: every 500 optimizer steps
- Early stopping patience: 999
- Early stopping threshold: 0.0
- Random seed: 42
Training was stopped after validation loss failed to improve for 999 consecutive evaluation rounds, unless the maximum epoch ceiling was reached first.
Best Model
Best validation loss:
1.5498346090316772
Final best-model validation loss:
1.5498346090316772
Perplexity:
4.71069101241065
- Downloads last month
- 964