Instructions to use asif00/bangla-llama-1B-gguf-16bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use asif00/bangla-llama-1B-gguf-16bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="asif00/bangla-llama-1B-gguf-16bit")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("asif00/bangla-llama-1B-gguf-16bit", dtype="auto") - llama-cpp-python
How to use asif00/bangla-llama-1B-gguf-16bit with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="asif00/bangla-llama-1B-gguf-16bit", filename="unsloth.F16.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use asif00/bangla-llama-1B-gguf-16bit with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf asif00/bangla-llama-1B-gguf-16bit:F16 # Run inference directly in the terminal: llama cli -hf asif00/bangla-llama-1B-gguf-16bit:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf asif00/bangla-llama-1B-gguf-16bit:F16 # Run inference directly in the terminal: llama cli -hf asif00/bangla-llama-1B-gguf-16bit:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf asif00/bangla-llama-1B-gguf-16bit:F16 # Run inference directly in the terminal: ./llama-cli -hf asif00/bangla-llama-1B-gguf-16bit:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf asif00/bangla-llama-1B-gguf-16bit:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf asif00/bangla-llama-1B-gguf-16bit:F16
Use Docker
docker model run hf.co/asif00/bangla-llama-1B-gguf-16bit:F16
- LM Studio
- Jan
- Ollama
How to use asif00/bangla-llama-1B-gguf-16bit with Ollama:
ollama run hf.co/asif00/bangla-llama-1B-gguf-16bit:F16
- Unsloth Studio
How to use asif00/bangla-llama-1B-gguf-16bit with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for asif00/bangla-llama-1B-gguf-16bit to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for asif00/bangla-llama-1B-gguf-16bit to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for asif00/bangla-llama-1B-gguf-16bit to start chatting
- Atomic Chat new
- Docker Model Runner
How to use asif00/bangla-llama-1B-gguf-16bit with Docker Model Runner:
docker model run hf.co/asif00/bangla-llama-1B-gguf-16bit:F16
- Lemonade
How to use asif00/bangla-llama-1B-gguf-16bit with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull asif00/bangla-llama-1B-gguf-16bit:F16
Run and chat with the model
lemonade run user.bangla-llama-1B-gguf-16bit-F16
List all available models
lemonade list
Bangla LLaMA GGUF 1B-16bit
Bangla LLaMA GGUF is a 1-billion-parameter language model optimized for Bengali-language tasks such as context-based question answering and retrieval-augmented generation. It is derived from LLaMA 3.2 1B and trained on the OdiaGenAI/all_combined_bengali_252k dataset.
Features
- Model Size: 1B parameters
- Format: GGUF (16-bit)
- Language: Bengali
- Use Cases:
- Context-based Question Answering
- Bengali Retrieval-Augmented Generation
- Integration: Compatible with
llama.cppand Hugging Facetransformers(with conversion)
Usage
1. Using with llama.cpp
Setup
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
make
Run Inference
./main -m path/to/asif00/bangla-llama-1B-gguf-16bit.gguf -p "আপনার প্রশ্ন এখানে"
2. Using with Hugging Face Transformers
Note: GGUF format is not directly supported by transformers. Conversion to a compatible format is required.
Prerequisites
pip install transformers accelerate
Example Script
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
# Load tokenizer and model (after conversion)
tokenizer = AutoTokenizer.from_pretrained("asif00/bangla-llama-1B")
model = AutoModelForCausalLM.from_pretrained("path/to/converted-model")
prompt = """
নিচের নির্দেশনা বাংলা ভাষায় যা একটি কাজ বর্ণনা করে, এবং ইনপুটও বাংলা ভাষায় যা অতিরিক্ত প্রসঙ্গ প্রদান করে। উপযুক্তভাবে অনুরোধ পূরণ করে বাংলা ভাষায় একটি প্রতিক্রিয়া লিখুন।
### নির্দেশনা:
{}
### ইনপুট:
{}
### প্রতিক্রিয়া:
"""
def generate_response(instruction, context):
input_text = prompt.format(instruction, context)
inputs = tokenizer(input_text, return_tensors="pt").to("cuda")
output = model.generate(**inputs, max_length=512, eos_token_id=tokenizer.eos_token_id)
response = tokenizer.decode(output[0], skip_special_tokens=True)
response = response.split("### প্রতিক্রিয়া:")[-1].strip()
return response
# Example
instruction = "ভারতীয় বাঙালি কথাসাহিত্যিক মহাশ্বেতা দেবীর সম্পর্কে একটি সংক্ষিপ্ত বিবরণ দিন।"
context = "মহাশ্বেতা দেবী ২০১৬ সালে হৃদরোগে আক্রান্ত হয়ে কলকাতায় মৃত্যুবরণ করেন।"
print(generate_response(instruction, context))
Example
question = "ভারতীয় বাঙালি কথাসাহিত্যিক মহাশ্বেতা দেবীর মৃত্যু কবে হয় ?"
context = (
"২০১৬ সালের ২৩ জুলাই হৃদরোগে আক্রান্ত হয়ে মহাশ্বেতা দেবী কলকাতার বেল ভিউ ক্লিনিকে ভর্তি হন। "
"সেই বছরই ২৮ জুলাই একাধিক অঙ্গ বিকল হয়ে তাঁর মৃত্যু ঘটে। তিনি মধুমেহ, সেপ্টিসেমিয়া ও মূত্র সংক্রমণ রোগেও ভুগছিলেন।"
)
answer = generate_response(question, context)
print("উত্তর:", answer)
Output:
উত্তর: মহাশ্বেতা দেবী ২৮ জুলাই ২০১৬ সালে মৃত্যুবরণ করেন।
Limitations
- Dataset Size: Trained on a limited dataset, which may affect response accuracy.
- Factuality: May generate incorrect or nonsensical answers.
- Language Support: Primarily optimized for Bengali; performance may vary for other languages.
Disclaimer
The Bangla LLaMA GGUF model's performance is contingent on the quality and diversity of the training data. Users should verify the information generated, especially for critical applications.
Additional Resources
- llama.cpp Repository: https://github.com/ggerganov/llama.cpp
- Hugging Face Dataset: OdiaGenAI/all_combined_bengali_252k
- Model Page: asif00/bangla-llama-1B-gguf-16bit
- Downloads last month
- 41
16-bit
Model tree for asif00/bangla-llama-1B-gguf-16bit
Base model
meta-llama/Llama-3.2-1B