File size: 2,460 Bytes
f41decf aa8aa27 f41decf 74a0694 aa8aa27 7f7e5f7 aa8aa27 7f7e5f7 aa8aa27 7f7e5f7 aa8aa27 7f7e5f7 aa8aa27 9308dda aa8aa27 f41decf e1dd7de 8b9d038 41ffa9a df86d4a 8b9d038 bbd04f0 8b9d038 d7398c4 5238431 e1dd7de 8b9d038 c656caa 8b9d038 6991149 8b9d038 f41decf 8b9d038 f41decf 8b9d038 f41decf 74a0694 |
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 |
---
language:
- en
license: apache-2.0
library_name: peft
tags:
- text-generation
widget:
- text: 'Below is an instruction that describes a task, paired with an input that
provides further context. Write a response that appropriately completes the request.
### Instruction: Generate an SQL statement to add a row in the customers table
where the columns are name, address, and city.
### Input: name = John, address = 123 Main Street, city = Winter Park
### Response:
'
inference:
parameters:
temperature: 0.1
max_new_tokens: 1024
base_model: meta-llama/Llama-2-7b-hf
---
# QLoRA weights using Llama-2-7b for the Code Alpaca Dataset
# Fine-Tuning on Predibase
This model was fine-tuned using [Predibase](https://predibase.com/), the first low-code AI platform for engineers.
I fine-tuned base Llama-2-7b using LoRA with 4 bit quantization on a single T4 GPU, which cost approximately $3 to train
on Predibase. Try out our free Predibase trial [here](https://predibase.com/free-trial).
Dataset and training parameters are borrowed from: https://github.com/sahil280114/codealpaca,
but all of these parameters including DeepSpeed can be directly used with [Ludwig](https://ludwig.ai/latest/), the open-source
toolkit for LLMs that Predibase is built on.
Co-trained by: [Infernaught](https://huggingface.co/Infernaught)
# How To Use The Model
To use these weights:
```python
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM
# Load base model in 4 bit
model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-hf", load_in_4bit=True)
# Wrap model with pretrained model weights
config = PeftConfig.from_pretrained("arnavgrg/codealpaca-qlora")
model = PeftModel.from_pretrained(model, "arnavgrg/codealpaca-qlora")
```
Prompt Template:
```
Below is an instruction that describes a task, paired with an input
that provides further context. Write a response that appropriately
completes the request.
### Instruction: {instruction}
### Input: {input}
### Response:
```
## Training procedure
The following `bitsandbytes` quantization config was used during training:
- load_in_8bit: False
- load_in_4bit: True
- llm_int8_threshold: 6.0
- llm_int8_skip_modules: None
- llm_int8_enable_fp32_cpu_offload: False
- llm_int8_has_fp16_weight: False
- bnb_4bit_quant_type: nf4
- bnb_4bit_use_double_quant: True
- bnb_4bit_compute_dtype: float16
### Framework versions
- PEFT 0.4.0 |