Downloads · 30 days
21
32% of all-time downloads
Brahmavamsi/llama-3.2-8b-16bit
llama-3.2-8b-16bit is a text generation model from Brahmavamsi. Use it when you need the model to write or continue text. It is set up for transformers.
--- libraryname: transformers tags: - unsloth - trl - sft ---
Downloads · 30 days
21
32% of all-time downloads
All-time downloads
65
Public
Parameters
8B
48.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
library_name: transformers tags:
This is a fine-tuned version of the LLaMA 3.2 8B model, designed specifically for instruction-following tasks in the Ewe language. The model has been trained on the multilingual Alpaca dataset with Ewe as a primary language, enabling applications like translation, text generation, and conversational AI in Ewe.
The model extends the capabilities of LLaMA 3.2 by fine-tuning it on Ewe-language instruction tasks. It supports multilingual applications and is part of the effort to increase representation for African languages in NLP.
Meta-LLaMA-3.2-8B-bnb-4bitThe model can be directly used for Ewe-language tasks such as:
Fine-tune for:
Training Data Fine-tuned on the multilingual Alpaca dataset with an Ewe-language subset. The dataset was sourced from the TACO Datasets.
Training Procedure Preprocessing [Optional]
Tokenization and formatting in the Alpaca prompt style to standardize input-output pairs. Training Hyperparameters
Training regime: Mixed precision with bf16 where supported. Learning rate: 3e-4 Batch size: 16 (4 per device, gradient accumulation of 4 steps) Optimizer: AdamW 8-bit Speeds, Sizes, Times [Optional]
Training Time: ~2 hours on a single NVIDIA A100 40GB GPU. Model Parameters: 20,971,520 trainable parameters (LoRA-adapted). Evaluation Testing Data, Factors & Metrics
Testing Data Held-out multilingual Alpaca examples, focusing on Ewe-language prompts. Factors Performance depends on:
Clarity of instruction prompts. Complexity of the task. Metrics Perplexity: [Measured value] BLEU Score (translation): [Measured value] Results
The model demonstrates robust instruction-following capabilities in Ewe with reasonable generalization across multilingual inputs.
Summary The fine-tuned model successfully adapts LLaMA to Ewe, filling a gap in NLP for African languages.
Use the code below to get started with the model:
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Brahmavamsi/llama-3.2-8b-16bit")
model = AutoModelForCausalLM.from_pretrained("Brahmavamsi/llama-3.2-8b-16bit")
inputs = tokenizer(
[
alpaca_prompt.format(
"ƉE EGƆME", # instruction
"DATA SCIENCE",# input
"", # output - leave this blank for generation!
)
], return_tensors = "pt").to(device)
from transformers import TextStreamer
text_streamer = TextStreamer(tokenizer)
_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 555)