Instructions to use BanglaLLM/bangla-llama-13b-base-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BanglaLLM/bangla-llama-13b-base-v0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BanglaLLM/bangla-llama-13b-base-v0.1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("BanglaLLM/bangla-llama-13b-base-v0.1") model = AutoModelForCausalLM.from_pretrained("BanglaLLM/bangla-llama-13b-base-v0.1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use BanglaLLM/bangla-llama-13b-base-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BanglaLLM/bangla-llama-13b-base-v0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BanglaLLM/bangla-llama-13b-base-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/BanglaLLM/bangla-llama-13b-base-v0.1
- SGLang
How to use BanglaLLM/bangla-llama-13b-base-v0.1 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 "BanglaLLM/bangla-llama-13b-base-v0.1" \ --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": "BanglaLLM/bangla-llama-13b-base-v0.1", "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 "BanglaLLM/bangla-llama-13b-base-v0.1" \ --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": "BanglaLLM/bangla-llama-13b-base-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use BanglaLLM/bangla-llama-13b-base-v0.1 with Docker Model Runner:
docker model run hf.co/BanglaLLM/bangla-llama-13b-base-v0.1
Can not generate proper Bangla
Even it is not instruction fine-tuned, it should have the ability to generate Bangla sentence correctly. It can not even generate correct Bangla sentences. But it can generate English sentences very well, even paragraph/story.
I'm interested in knowing which dataset is used to fine-tune this model.
Here is the test result of this model:
https://www.kaggle.com/code/muhammadmazed/check-banglallm-bangla-llama-13b-base-v0-1
Hey, thanks for the comment. This is a base model (pretrained). Base models are not good at specific task. You need to look into the instruct finetuned model. One of the best is possibly https://huggingface.co/BanglaLLM/BanglaLLama-3.1-8b-bangla-alpaca-orca-instruct-v0.0.1
It's not surprising that these models can generate well in English (because more than 90% of the language it's trained on is with English). The reason it's not good in Bangla is because it has not seen enough Bangla examples. Feel free to contribute by taking these models and tuning it. :)
So what exactly you did to this model? It's the same as the original llama base model. Your Bangla base model should generate proper sentences in Bangla. Base models cannot follow instructions, answer to questions, we all know that. But Base models must be able to generate complete sentences. In English, your model can do what it should but in Bangla it just the same as the original llama model. Seems like it is not even fine-tuned in Bangla.
AGAIN, IT'S BANGLA GENERATION CAPABILITY IS THE SAME AS THE ORIGINAL MODEL FROM META.