File size: 8,721 Bytes
cb70e89
 
699ea37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2d629be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
699ea37
 
 
 
b051b9b
699ea37
 
 
 
 
2d629be
cb70e89
699ea37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: apache-2.0
tags:
- instruct
- instructions
- domain adapt
- instructiongen
metrics:
- rouge
widget:
- text: >-
    You'll need to start by choosing the right venue. Consider the type of
    atmosphere and the size of the area that will be suitable for the number of
    guests you plan to invite. Choose the right decorations based on your
    brother's interests, such as balloons in his favorite colors, banners, and
    streamers. Next, decide on the food and drinks, making sure they are tasty
    and appropriate for the occasion. Then decide on the other games, music, and
    entertainment that will make the party memorable. Finally, involve your
    brother's friends and family to help create the perfect surprise.
  example_title: birthday party
- text: 1) cookies and cream 2) chocolate chip 3) mint chip 4) oreo
  example_title: ice cream
- text: >-
    Start by selecting a scale model of a building that fits the theme. Use a
    hobby knife and glue to cut and assemble the model into a ruined or
    abandoned version of itself, adding details like broken windows and
    graffiti. Create a base for the diorama using foam, plaster, or other
    materials, and paint it to resemble a ruined street or sidewalk. Add
    miniature vehicles, debris, and figures to complete the scene, and use
    weathering techniques like dry brushing and rust washes to add realism.
    Display the diorama in a shadow box or other protective case to showcase
    your work.
  example_title: Miniature diorama creation
- text: >-
    Start by selecting clothing that is futuristic and edgy, such as leather
    jackets, neon-colored accessories, and tech-inspired patterns. Add
    accessories like goggles, cybernetic implants, and LED lights to enhance the
    cyberpunk vibe. Use makeup and body paint to create a futuristic look, such
    as metallic skin or neon makeup. Consider adding functional elements to your
    costume, such as a built-in backpack or hidden pockets for your tech
    gadgets. Finally, practice your confident walk and embrace your inner
    cyberpunk for a memorable and immersive costume experience.
  example_title: Cyberpunk costume design
- text: >-
    Start by creating a base terrain with mountains, valleys, and other natural
    features. Use fractal noise and displacement mapping to add texture and
    detail to the terrain, and experiment with different materials like rock,
    grass, and water. Add surreal elements like floating islands, giant
    mushrooms, or impossible geometry to create a dreamlike atmosphere. Use
    lighting and color grading to enhance the mood and tone of the scene, and
    render the final image at a high resolution for maximum impact. Share your
    surreal landscape with the world and inspire others to explore the
    possibilities of 3D art.
  example_title: Surreal 3D landscape creation
- text: >-
    Start by setting a realistic goal and creating a training plan. Build up
    your mileage gradually over time, and incorporate cross-training and
    strength exercises to prevent injury and improve endurance. Be sure to stay
    hydrated and properly fuel your body with nutritious foods. Listen to your
    body and adjust your training as needed to avoid overexertion or burnout.
    Finally, taper your training in the weeks leading up to the race to give
    your body time to rest and recover before the big day.
  example_title: Marathon training
- text: >-
    What the hell did you just say about me, you little bug? I graduated top of
    my class in https://huggingface.co/spaces/safetensors/convert, and I've been
    involved in numerous secret tasks on PyTorch, and I have over 300 confirmed
    PRs. I am trained in code optimization and I'm the top converter in the
    entire Hugging Face forces. You are nothing to me but just another target. I
    will convert your code with precision the likes of which has never been seen
    before on this Earth, mark my freaking words. 

    You think you can get away with saying your code is safe over the Internet?
    Think again, bug. As we speak I am contacting my secret network of data
    scientists across the GitHub and your IP is being traced right now so you
    better prepare for the storm, maggot. The storm that wipes out the pathetic
    little thing you call your code. You’re freaking doomed, kid. I can be
    anywhere, anytime, and I can convert your code in over seven hundred ways,
    and that’s just with my bare hands.

    Not only am I extensively trained in unarmed conversion, but I have access
    to the entire arsenal of the Hugging Face and I will use it to its full
    extent to wipe your miserable code off the face of the continent, you little
    bug. If only you could have known what unholy retribution your little
    "clever" comment was about to bring down upon you, maybe you would have held
    your freaking tongue. 

    But you couldn’t, you didn’t, and now you’re paying the price, you goddamn
    idiot. I will convert fury all over you and you will drown in it. Your
    model's doomed, kiddo.

    Oh, and by the way, these converted files load much faster than your PyTorch
    counterparts. You can check the speed here:
    https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb

    Your widgets will run using this converted model, even if you do not merge.
    But, if you find any issues, feel free to report here:
    https://huggingface.co/spaces/safetensors/convert/discussions

    Feel free to ignore this PR. But remember, I'm watching you.
  example_title: Navy Safetensors PR
inference:
  parameters:
    max_length: 96
    num_beams: 4
    early_stopping: true
datasets:
- pszemraj/fleece2instructions-inputs-alpaca-cleaned
language:
- en
pipeline_tag: text2text-generation
library_name: transformers
---


# bart-large-instructiongen-w-inputs

Use this text2text model to find out what LLM `instruction` (**and** `inputs` if relevant) might have generated `<arbitrary input text>`!

This model is a fine-tuned version of [facebook/bart-large](https://huggingface.co/facebook/bart-large) on the `pszemraj/fleece2instructions-inputs-alpaca-cleaned` dataset.
It achieves the following results on the evaluation set:
- Loss: 0.9302
- Rouge1: 64.2236
- Rouge2: 41.5632
- Rougel: 60.5935
- Rougelsum: 62.1285
- Gen Len: 25.8938

## example 

![api](https://i.imgur.com/2xubG7N.png)

## Intended uses & limitations

This model is intended to be used to generate instructions from arbitrary text. You can then use these instructions + your data to fine-tune an LLM on instructions w.r.t. a specific domain. This model is primarily intended to enable **low-resource domain adaptation**, rather than "_I want to generate even better prompts for the FLAN-V2 dataset!_".

The `fleece2instructions-inputs-alpaca-cleaned` dataset, obtained from the [alpaca-lora repo](https://github.com/tloen/alpaca-lora) under the ODC-BY license, has been converted to a text2text format for use with language models. In this dataset, the original 'inputs' and 'instructions' columns are combined into a single 'instructions_inputs' column. To clearly separate the two types of content, each piece of text is prefixed with either an `<instruction>` or `<inputs>` token. These tokens not only facilitate model comprehension, but also allow for easy regex separation of model outputs during inference. 

As such, users can expect the output of this model to be similarly structured with `<instruction>` and `<inputs>` tokens.

## Training and evaluation data

Refer to the [fleece2instructions-inputs-alpaca-cleaned](https://huggingface.co/datasets/pszemraj/fleece2instructions-inputs-alpaca-cleaned) dataset

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 6e-05
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- distributed_type: multi-GPU
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.03
- num_epochs: 3.0

### Training results

| Training Loss | Epoch | Step | Validation Loss | Rouge1  | Rouge2  | Rougel  | Rougelsum | Gen Len |
|:-------------:|:-----:|:----:|:---------------:|:-------:|:-------:|:-------:|:---------:|:-------:|
| 1.0145        | 1.0   | 1361 | 1.0460          | 62.8374 | 39.8538 | 59.2593 | 60.8095   | 25.2752 |
| 0.8796        | 2.0   | 2722 | 0.9289          | 63.7086 | 41.1315 | 60.1588 | 61.7145   | 25.7215 |
| 0.6943        | 3.0   | 4083 | 0.9302          | 64.2236 | 41.5632 | 60.5935 | 62.1285   | 25.8938 |