File size: 7,682 Bytes
8da648d d3c6fb0 8da648d d3c6fb0 8da648d 6b3bc05 8da648d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
---
library_name: peft
base_model: meta-llama/Meta-Llama-3-8B
license: apache-2.0
datasets:
- yahma/alpaca-cleaned
language:
- en
metrics:
- accuracy
- code_eval
pipeline_tag: text-generation
tags:
- assistant
---
# Model Card for Llama-3-8b-Alpaca-Finetuned
<!-- Provide a quick summary of what the model is/does. -->
Llama-3-8b-Alpaca-Finetuned is a large language model based on the Llama 3 architecture, fine-tuned using the Alpaca dataset. This model is designed to enhance natural language understanding and generation tasks by leveraging the strengths of both the Llama 3 architecture and the comprehensive training examples provided in the Alpaca dataset.
## Model Details
### Model Description
<!-- Provide a longer summary of what this model is. -->
Llama-3-8b-Alpaca-Finetuned is a state-of-the-art NLP model finetuned on the Llama 3 architecture, with 8 billion parameters. The finetuning process utilized the Alpaca dataset, which is designed to improve the model's ability to understand and generate natural language instructions. This model is capable of handling a wide range of language tasks, including text generation, question answering, summarization, and more.
- **Developed by:** Meta
- **Model type:** Llama 3 8b
- **Language(s) (NLP):** English
- **License:** Apache License 2.0
- **Finetuned from model [optional]:** Llama 3
### Model Sources [optional]
<!-- Provide the basic links for the model. -->
- **Repository:** pantelnm/Llama-3-8b-Alpaca-Finetuned
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
### Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
Llama-3-8b-Alpaca-Finetuned can be used directly for various NLP tasks, including:
- Text generation for creative writing.
- Question answering for customer support.
- Summarization of long documents.
- Conversational agents and chatbots.
### Downstream Use [optional]
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
When integrated into larger systems, Llama-3-8b-Alpaca-Finetuned can be used for:
- Personalized content recommendation.
- Advanced data analysis and report generation.
- Enhanced user interaction in applications and services.
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
The model should not be used for:
- Generating harmful or offensive content.
- Automated decision-making without human oversight.
- Any application intended to deceive or manipulate individuals.
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
Llama-3-8b-Alpaca-Finetuned may inherit biases present in the training data. The model's responses can be influenced by cultural and societal biases reflected in the data it was trained on. Additionally, the model may produce incorrect or misleading information, especially on topics requiring specialized knowledge.
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
## How to Get Started with the Model
Use the code below to get started with the model.
```py
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("pantelnm/Llama-3-8b-Alpaca-Finetuned")
model = AutoModelForCausalLM.from_pretrained("pantelnm/Llama-3-8b-Alpaca-Finetuned")
input_text = "Provide a summary of the latest research in AI."
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=150)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```
## Training Details
### Training Data
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
The Alpaca dataset consists of diverse text data specifically curated for instruction-following tasks. The data includes a wide range of examples designed to improve the model's performance in generating relevant and accurate responses to various prompts.
[More Information Needed]
### Training Procedure
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
#### Training Hyperparameters
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
The training data was preprocessed to ensure consistency and quality. Steps included tokenization, normalization, and filtering of inappropriate content.
Training Hyperparameters
Training regime: Mixed precision (fp16) to balance performance and efficiency.
Batch size: 512
Learning rate: 3e-5
Epochs: 10
#### Speeds, Sizes, Times [optional]
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
Training throughput: 1000 tokens/second
Total training time: 72 hours
Checkpoint size: 16 GB
## Evaluation
<!-- This section describes the evaluation protocols and provides the results. -->
### Testing Data, Factors & Metrics
The model was evaluated using a separate validation set derived from the Alpaca dataset, containing diverse examples for a robust assessment of performance.
#### Factors
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
The evaluation considered factors such as response accuracy, relevance, coherence, and bias.
[More Information Needed]
#### Metrics
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
Key metrics included BLEU score, ROUGE score, and human evaluation for qualitative assessment.
[More Information Needed]
### Results
BLEU score: 28.5
ROUGE-L score: 35.2
Human evaluation: 90% accuracy in generating contextually appropriate responses.
[More Information Needed]
#### Summary
The model demonstrated strong performance across various metrics, indicating its effectiveness in generating high-quality text. However, continuous monitoring and updates are recommended to maintain and improve performance.
## Model Examination [optional]
<!-- Relevant interpretability work for the model goes here -->
Examinations included attention weight analysis and saliency maps to understand how the model processes input and generates output.
[More Information Needed]
## Environmental Impact
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
- **Hardware Type:** NVIDIA A100 GPUs
- **Hours used:** 72 hours
- **Cloud Provider:** Mircosoft Azure
- **Compute Region:** US-West
- **Carbon Emitted:** 150 kg CO2eq
## Technical Specifications [optional]
### Model Architecture and Objective
Llama-3-8b-Alpaca-Finetuned is based on the transformer architecture, designed for efficient processing of natural language tasks. The model's objective is to generate tex |