Instructions to use HFShishir/BanglaFast-500M-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HFShishir/BanglaFast-500M-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HFShishir/BanglaFast-500M-Instruct")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HFShishir/BanglaFast-500M-Instruct") model = AutoModelForCausalLM.from_pretrained("HFShishir/BanglaFast-500M-Instruct", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HFShishir/BanglaFast-500M-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HFShishir/BanglaFast-500M-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HFShishir/BanglaFast-500M-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HFShishir/BanglaFast-500M-Instruct
- SGLang
How to use HFShishir/BanglaFast-500M-Instruct 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 "HFShishir/BanglaFast-500M-Instruct" \ --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": "HFShishir/BanglaFast-500M-Instruct", "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 "HFShishir/BanglaFast-500M-Instruct" \ --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": "HFShishir/BanglaFast-500M-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HFShishir/BanglaFast-500M-Instruct with Docker Model Runner:
docker model run hf.co/HFShishir/BanglaFast-500M-Instruct
Download tokenizer_config.json from HFShishir/BanglaFast-500M-Instruct: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/HFShishir/BanglaFast-500M-Instruct/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://HFShishir/BanglaFast-500M-Instruct/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/HFShishir/BanglaFast-500M-Instruct/resolve/main/tokenizer_config.json
1.08 kB
| { | |
| "backend": "tokenizers", | |
| "bos_token": "<s>", | |
| "clean_up_tokenization_spaces": true, | |
| "eos_token": "</s>", | |
| "extra_special_tokens": [ | |
| "<|endoftext|>", | |
| "<s>", | |
| "</s>", | |
| "<unk>", | |
| "<pad>", | |
| "<mask>", | |
| "<think>", | |
| "</think>", | |
| "<|im_start|>", | |
| "<|im_end|>", | |
| "<|system|>", | |
| "<|user|>", | |
| "<|assistant|>", | |
| "<|tool_call|>", | |
| "<|tool_result|>", | |
| "<|code|>", | |
| "<|/code|>", | |
| "<|math|>", | |
| "<|/math|>" | |
| ], | |
| "is_local": false, | |
| "local_files_only": false, | |
| "mask_token": "<mask>", | |
| "model_max_length": 1000000000000000019884624838656, | |
| "model_type": "bpe", | |
| "pad_token": "<pad>", | |
| "special_tokens": [ | |
| "<|endoftext|>", | |
| "<s>", | |
| "</s>", | |
| "<unk>", | |
| "<pad>", | |
| "<mask>", | |
| "<think>", | |
| "</think>", | |
| "<|im_start|>", | |
| "<|im_end|>", | |
| "<|system|>", | |
| "<|user|>", | |
| "<|assistant|>", | |
| "<|tool_call|>", | |
| "<|tool_result|>", | |
| "<|code|>", | |
| "<|/code|>", | |
| "<|math|>", | |
| "<|/math|>" | |
| ], | |
| "tokenizer_class": "TokenizersBackend", | |
| "unk_token": "<unk>", | |
| "vocab_size": 48000 | |
| } | |