transformers pytorch llama text-generation dataset:mlabonne/guanaco-llama2-1k autotrain_compatible endpoints_compatible text-generation-inference region:us
---
datasets:
- mlabonne/guanaco-llama2-1k
pipeline_tag: text-generation
---

# Model Card for Model ID

<!-- Provide a quick summary of what the model is/does. -->

This model is a fine-tuned version of <a href="https://huggingface.co/NousResearch/Llama-2-7b-chat-hf">NousResearch/Llama-2-7b-chat-hf</a> on <a href="https://huggingface.co/datasets/mlabonne/guanaco-llama2-1k">mlabonne/guanaco-llama2-1k</a> dataset.

## Model Details

### Model Sources [optional]

<!-- Provide the basic links for the model. -->

- **Base Model:** <a href = "https://huggingface.co/NousResearch/Llama-2-7b-chat-hf">NousResearch/Llama-2-7b-chat-hf</a> 
- **Demo:** <a href = "https://colab.research.google.com/drive/1PEQyJO1-f6j0S_XJ8DV50NkpzasXkrzd?usp=sharing#scrollTo=ib_We3NLtj2E">llama2 finetuning demo</a>


## How to Get Started with the Model

Use the code below to get started with the model.

```
from transformers import pipeline

prompt = "What is a large language model?"
pipe = pipeline(task="text-generation", model="likhith231/llama-2-7b-miniguanaco",max_length=200)
result = pipe(f"<s>[INST] {prompt} [/INST]")
print(result[0]['generated_text'])
```

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 4
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.03
- num_epochs: 1

### Framework versions

- PEFT 0.8.2
- Transformers 4.37.0
- Pytorch 2.1.2
- Datasets 2.17.0
- Tokenizers 0.15.1