Downloads · 30 days
8
1% of all-time downloads
nealchandra/llama-2-7b-hf-lora-alpaca-json
llama-2-7b-hf-lora-alpaca-json is a machine learning model from nealchandra. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
This model is simple POC for JSON based text completion for instructions following tasks. It was trained on the 20,000 records from the Alpaca dataset with a simple prompt template to expect and return JSON inputs. Th…
Downloads · 30 days
8
1% of all-time downloads
All-time downloads
622
Public
Repo size
470 MB
Likes
2
Public
Click a slice to open those files.
.bin67.2 MB · 100%
From the Hugging Face model README
This model is simple POC for JSON based text completion for instructions following tasks. It was trained on the 20,000 records from the Alpaca dataset with a simple prompt template to expect and return JSON inputs. The prompt template used is roughly like this:
### INPUT:
```json
{"instructions": "<INSTRUCTIONS>", "input": "<INPUT>"}
```
### OUTPUT:
```json
{"response": "<OUTPUT">}
```
New-lines are escaped, which means you would want to prompt the model like this:
### INPUT:\n```json\n{"instructions": "Explain what an alpaca is"}\n```\n### OUTPUT:\n
As you can see from this example, the input arg in the input JSON can be omitted if they are not needed. The training dataset include examples with and without additional inputs and the model was trained to handle both cases.
Ultimately, you can expect the model to behave like an Alpaca finetune on top of llama-2-7b, the only difference is that it should reliably expect and respond in json format.
The adapter was trained for 5 epochs using QLoRA with an average training loss of 0.7535.
The following hyperparameters were used:
The following bitsandbytes quantization config was used during training: