legacy-datasets/common_voice
Updated • 1.58k • 147
How to use ChrisToukmaji/llama_luganda_LAFT with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="ChrisToukmaji/llama_luganda_LAFT", device_map="auto") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("ChrisToukmaji/llama_luganda_LAFT")
model = AutoModelForCausalLM.from_pretrained("ChrisToukmaji/llama_luganda_LAFT", device_map="auto")How to use ChrisToukmaji/llama_luganda_LAFT with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ChrisToukmaji/llama_luganda_LAFT"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "ChrisToukmaji/llama_luganda_LAFT",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/ChrisToukmaji/llama_luganda_LAFT
How to use ChrisToukmaji/llama_luganda_LAFT with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "ChrisToukmaji/llama_luganda_LAFT" \
--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": "ChrisToukmaji/llama_luganda_LAFT",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "ChrisToukmaji/llama_luganda_LAFT" \
--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": "ChrisToukmaji/llama_luganda_LAFT",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use ChrisToukmaji/llama_luganda_LAFT with Docker Model Runner:
docker model run hf.co/ChrisToukmaji/llama_luganda_LAFT
Paper: Few-Shot Cross-Lingual Transfer for Prompting Large Language Models in Low-Resource Languages
@misc{toukmaji2024fewshot,
title={Few-Shot Cross-Lingual Transfer for Prompting Large Language Models in Low-Resource Languages},
author={Christopher Toukmaji},
year={2024},
eprint={2403.06018},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
This model is a fine-tuned version of HF_llama on the common_voice lg dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training: