Model Card for Llama-3.2-1B-Instruct Fine-Tuned with LoRA Weights

This model is a fine-tuned version of the "meta-llama/Llama-3.2-1B-Instruct" using LoRA (Low-Rank Adaptation) weights. It was trained to assist in answering questions and providing information on a range of topics. The model is designed to be used with the ๐Ÿค— Hugging Face transformers library

Model Details

Model Description

This model is based on the Llama-3.2-1B-Instruct architecture and has been fine-tuned with LoRA weights to improve its performance on specific downstream tasks. It was trained on a carefully selected dataset to enable more focused and contextual responses. The model is designed to perform well in environments where GPU resources may be limited, using optimizations like FP16 and device mapping.

  • Developed by: Soorya R
  • Model type: Causal Language Model with LoRA fine-tuning
  • Language(s) (NLP): Primarily English
  • License: Model card does not specify a particular license; check the base model's license on Hugging Face for usage guidelines.
  • Finetuned from model: meta-llama/Llama-3.2-1B-Instruct

Model Sources [optional]

Uses

Direct Use

This model can be directly used for general-purpose question-answering and information retrieval tasks in English. It is suitable for chatbots and virtual assistants and performs well in scenarios where contextual responses are important.

Downstream Use

The model may also be further fine-tuned for specific tasks that require conversational understanding and natural language generation.

Out-of-Scope Use

This model is not suitable for tasks outside of general-purpose NLP. It should not be used for high-stakes decision-making, tasks requiring detailed scientific or legal knowledge, or applications that could impact user safety or privacy.

Bias, Risks, and Limitations

This model was fine-tuned on a curated dataset but still inherits biases from the underlying Llama model. Users should be cautious about using it in sensitive or biased contexts, as the model may inadvertently produce outputs that reflect biases present in the training data.

Recommendations

Users (both direct and downstream) should be made aware of the potential risks and limitations of the model, including biases in language or domain limitations. More robust evaluation is recommended before deployment in critical applications.

How to Get Started with the Model

Use the code below to get started with the model.

from transformers import AutoModelForCausalLM, AutoTokenizer

Load the model

model = AutoModelForCausalLM.from_pretrained("Soorya03/Llama-3.2-1B-Instruct-LoRA")

Load the tokenizer

tokenizer = AutoTokenizer.from_pretrained("Soorya03/Llama-3.2-1B-Instruct-LoRA")

Generate text

inputs = tokenizer("Your input text here", return_tensors="pt") outputs = model.generate(**inputs) print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Training Details

Training Data

The model was fine-tuned on a custom dataset, optimized for contextual question-answering tasks and general-purpose conversational use. The dataset was split into training and validation sets to enhance model generalization.

Training Procedure

Training Hyperparameters

Precision: FP16 mixed precision Epochs: 10 Batch size: 4 Learning rate: 2e-4

Times

Training time: Approximately 1 hour on Google Colab's T4 GPU.

Model Examination

For interpretability, tools like transformers's pipeline can help visualize the model's attention mechanisms and interpret its outputs. However, users should be aware that this is a black-box model.

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: Google Colab T4 GPU
  • Hours used: 1
  • Cloud Provider: Google Colab

Technical Specifications

Model Architecture and Objective

The model follows the Llama architecture, which is a transformer-based model designed for NLP tasks. The objective of fine-tuning with LoRA weights was to enhance contextual understanding and response accuracy.

Compute Infrastructure

Hardware

Google Colab T4 GPU with FP16 precision enabled

Software

Library: ๐Ÿค— Hugging Face transformers Framework: PyTorch Other dependencies: PEFT library for LoRA weights integration

Citation [optional]

@misc{soorya2024llama, author = {Soorya R}, title = {Llama-3.2-1B-Instruct Fine-Tuned with LoRA Weights}, year = {2024}, url = {https://huggingface.co/Soorya03/Llama-3.2-1B-Instruct-LoRA}, }

Glossary

FP16: 16-bit floating point precision, used to reduce memory usage and speed up computation. LoRA: Low-Rank Adaptation, a method for parameter-efficient fine-tuning.

More Information [optional]

For more details, please visit the model repository.

Model Card Authors

Soorya R

Downloads last month
116
Safetensors
Model size
1.24B params
Tensor type
FP16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support