Downloads · 30 days
5
17% of all-time downloads
arunb74/llama-3.2-3b-nhm-production
llama-3.2-3b-nhm-production is a text generation model from arunb74. Use it when you need the model to write or continue text. It is set up for peft.
A PEFT/LoRA fine-tuned adapter based on Meta Llama 3.2 3B Instruct.
Downloads · 30 days
5
17% of all-time downloads
All-time downloads
30
Public
Repo size
35.6 MB
Likes
0
Public
Click a slice to open those files.
.safetensors18.4 MB · 52%
From the Hugging Face model README
A PEFT/LoRA fine-tuned adapter based on Meta Llama 3.2 3B Instruct.
This model is intended for multilingual NLP tasks related to the NHM (National Health Mission) use case.
Important: This repository contains the LoRA/PEFT adapter, not the complete base model weights. The base model
meta-llama/Llama-3.2-3B-Instructis required to use this adapter.
meta-llama/Llama-3.2-3B-InstructThis repository contains:
adapter_config.json
adapter_model.safetensors
chat_template.jinja
special_tokens_map.json
tokenizer_config.json
tokenizer.json
README.md
The large original Llama model weights are not included in this repository.
The adapter was fine-tuned from:
meta-llama/Llama-3.2-3B-Instruct
The base model is gated by Meta on Hugging Face. Users must have the required access to the base model before loading this adapter.
Install the required Python packages:
pip install torch transformers peft accelerate
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model_id = "meta-llama/Llama-3.2-3B-Instruct"
adapter_id = "arunb74/llama32-3b-nhm-production"
tokenizer = AutoTokenizer.from_pretrained(
base_model_id
)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
model = PeftModel.from_pretrained(
base_model,
adapter_id
)
model.eval()
messages = [
{
"role": "user",
"content": "Your question here"
}
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
with torch.no_grad():
outputs = model.generate(
inputs,
max_new_tokens=256,
temperature=0.7,
do_sample=True
)
response = tokenizer.decode(
outputs[0][inputs.shape[-1]:],
skip_special_tokens=True
)
print(response)
This adapter is designed for multilingual use cases. The actual supported languages and performance depend on the training data and fine-tuning configuration.
Example:
messages = [
{
"role": "user",
"content": "Enter your multilingual NHM-related question here."
}
]
Use the same language as the input when multilingual response behavior is desired.
This model was fine-tuned using the LoRA (Low-Rank Adaptation) approach through Hugging Face PEFT.
Only the adapter parameters are stored in this repository.
The resulting adapter is approximately:
adapter_model.safetensors
~18 MB
This is significantly smaller than the original Llama 3.2 3B model because the full base model weights are not duplicated.
The adapter configuration is stored in:
adapter_config.json
The adapter should be loaded on top of the corresponding base model:
meta-llama/Llama-3.2-3B-Instruct
Do not load the adapter as if it were a standalone causal language model.
The adapter was fine-tuned for an NHM-related multilingual use case.
Specific training dataset details, including dataset size, language distribution, preprocessing, and licensing, should be documented separately if applicable.
Evaluation should be performed against the intended NHM multilingual production tasks.
Recommended evaluation dimensions include:
No standardized benchmark results are currently provided in this model card.
This model inherits limitations from the underlying Llama 3.2 3B Instruct model and may also introduce additional limitations from the fine-tuning data.
Potential limitations include:
The model should not be assumed to provide authoritative medical, legal, financial, or other high-stakes advice.
This model is intended for:
For production applications, responses should be appropriately validated and monitored.
This model should not be used as the sole decision-making system for:
Human review and appropriate domain-specific safeguards should be used where necessary.
Meta Llama 3.2 3B Instruct
Hugging Face PEFT
0.10.0
The exact hardware, training duration, batch size, learning rate, number of epochs, and other training parameters should be added here if available.
The base model is subject to the license and usage terms provided by Meta for Llama 3.2.
Users should review and comply with the applicable Llama 3.2 license and acceptable-use requirements before using the model.
This adapter repository does not replace the licensing requirements of the base model.
If you use this adapter in research or an application, please cite the underlying Llama model and the relevant project or dataset documentation.
This model is based on:
Meta Llama 3.2 3B Instruct
and uses the Hugging Face PEFT framework for parameter-efficient fine-tuning.
For questions regarding this adapter or the associated NHM multilingual project, please refer to the project documentation and repository maintainers.