Instructions to use deshanksuman/RomanizedSinhala_DistilGPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deshanksuman/RomanizedSinhala_DistilGPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deshanksuman/RomanizedSinhala_DistilGPT")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("deshanksuman/RomanizedSinhala_DistilGPT") model = AutoModelForCausalLM.from_pretrained("deshanksuman/RomanizedSinhala_DistilGPT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use deshanksuman/RomanizedSinhala_DistilGPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deshanksuman/RomanizedSinhala_DistilGPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deshanksuman/RomanizedSinhala_DistilGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/deshanksuman/RomanizedSinhala_DistilGPT
- SGLang
How to use deshanksuman/RomanizedSinhala_DistilGPT 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 "deshanksuman/RomanizedSinhala_DistilGPT" \ --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": "deshanksuman/RomanizedSinhala_DistilGPT", "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 "deshanksuman/RomanizedSinhala_DistilGPT" \ --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": "deshanksuman/RomanizedSinhala_DistilGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use deshanksuman/RomanizedSinhala_DistilGPT with Docker Model Runner:
docker model run hf.co/deshanksuman/RomanizedSinhala_DistilGPT
Download tokenizer.json from deshanksuman/RomanizedSinhala_DistilGPT: direct link, hf CLI and curl.
- Browser
- Download file 12.9 MB
-
https://huggingface.co/deshanksuman/RomanizedSinhala_DistilGPT/resolve/main/tokenizer.json
- Command line
-
hf download hf://deshanksuman/RomanizedSinhala_DistilGPT/tokenizer.json
-
curl -L -o tokenizer.json https://huggingface.co/deshanksuman/RomanizedSinhala_DistilGPT/resolve/main/tokenizer.json
12.9 MB
- Xet hash:
- 843c8a63a0dc0f5b6d676e5b4916db07f56d248be1b49c2b06268b2ac135d582
- Size of remote file:
- 12.9 MB
- SHA256:
- 81a66d53e2ed06a96c95e65df3bc1a866586f2e8aece9aace63d1c5c78d63fda
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.