Instructions to use israel/LLAMA-Walia-II with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use israel/LLAMA-Walia-II with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="israel/LLAMA-Walia-II")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("israel/LLAMA-Walia-II") model = AutoModelForCausalLM.from_pretrained("israel/LLAMA-Walia-II", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use israel/LLAMA-Walia-II with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "israel/LLAMA-Walia-II" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "israel/LLAMA-Walia-II", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/israel/LLAMA-Walia-II
- SGLang
How to use israel/LLAMA-Walia-II 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 "israel/LLAMA-Walia-II" \ --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": "israel/LLAMA-Walia-II", "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 "israel/LLAMA-Walia-II" \ --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": "israel/LLAMA-Walia-II", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use israel/LLAMA-Walia-II with Docker Model Runner:
docker model run hf.co/israel/LLAMA-Walia-II
metadata
license: apache-2.0
datasets:
- EthioNLP/Amharic_Instruction_dataset
- iocuydi/amharic-alpaca
language:
- am
- en
Walia-LLM: Enhancing Amharic-LLaMA by Integrating Task-Specific and Generative Datasets - combined data
Model Details
- Base model: LLaMA-2
- Fine-tuning method: Supervised fine-tuning (SFT) using LoRA
- Language: Amharic
- Tasks:
- Sentiment analysis
- Question answering
- Named entity recognition
- News classification
- Summarization
- Machine translation
- Poem/story/lyrics generation
- Spelling correction
Training Data
The model was trained on a custom instruction dataset derived from:
- Existing NLP benchmarks (e.g., AfriSenti, AmharicQA, MasakhaNER, MasakhaNews, XL-Sum)
- Manually collected generative datasets (e.g., religious lyrics, stories, poems)
- Translated instruction datasets (e.g., Alpaca, Dolly)
See EthioNLP/walia-amharic-instructions for the dataset used.
Intended Use
This model is intended for:
- Research on instruction tuning in low-resource languages
- Generative NLP tasks in Amharic
- Evaluating multilingual LLM capabilities
Limitations
- Some generative outputs may be verbose or imprecise.
- Limited understanding of highly specific Amharic poetic or lyrical structures.
- Spell correction and NER performance is still under exploration.
Example Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("israel/LLAMA-Walia-II")
tokenizer = AutoTokenizer.from_pretrained("israel/LLAMA-Walia-II")
prompt = "α΅α α ααα ααα αααα« α α
αα₯α’"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Citation
@inproceedings{azime-etal-2024-walia,
title = "Walia-{LLM}: Enhancing {A}mharic-{LL}a{MA} by Integrating Task-Specific and Generative Datasets",
author = "Azime, Israel Abebe and Tonja, Atnafu Lambebo and Belay, Tadesse Destaw and Fuge, Mitiku Yohannes and Wassie, Aman Kassahun and Jada, Eyasu Shiferaw and Chanie, Yonas and Sewunetie, Walelign Tewabe and Yimam, Seid Muhie",
editor = "Al-Onaizan, Yaser and Bansal, Mohit and Chen, Yun-Nung",
booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2024",
month = nov,
year = "2024",
address = "Miami, Florida, USA",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2024.findings-emnlp.25/",
doi = "10.18653/v1/2024.findings-emnlp.25",
pages = "432--444"
}