Updated and improved implementation of the self-instruct system.
Project description
airoboros: using large language models to fine-tune large language models
This is my take on implementing the Self-Instruct paper. The approach is quite heavily modified, and does not use any human-generated seeds.
This updated implementation supports either the /v1/completions endpoint or /v1/chat/completions, which is particularly useful in that it supports gpt-4 and gpt-3.5-turbo (which is 1/10 the cost of text-davinci-003).
Key differences
- support for either /v1/completions or /v1/chat/completions APIs (which allows gpt-3.5-turbo instead of text-davinci-003, as well as gpt-4 if you have access)
- support for custom topics list, custom topic generation prompt, or completely random topics
- in-memory vector db (Chroma) for similarity comparison, which is much faster than calculating rouge score for each generated instruction
- (seemingly) better prompts, which includes injection of random topics to relate the instructions to, which creates much more diverse synthetic instructions
- asyncio producers with configurable batch size
- several "instructors", each targetting specific use-cases, such as Orca style reasoning/math, role playing, etc.
- tries to ensure the context, if provided, is relevant to the topic and contains all the information that would be necessary to respond to the instruction, and nost just a link to article/etc.
- generally speaking, this implementation tries to reduce some of the noise
Generating instructions
NEW - 2023-07-18
To better accomodate the plethora of options, the configuration has been moved to a YAML config file.
Please create a copy of example-config.yaml
and configure as desired.
Once you have the desired configuration, run:
airoboros generate-instructions --config-path /path/to/config.yaml
Generating topics
NEW - 2023-07-18
Again, this is now all YAML configuration based! Please create a customized version of the YAML config file, then run:
airoboros generate-topics --config-path /path/to/config.yaml
You can override the topic_prompt
string in the configuration to use a different topic generation prompt.
Support the work
Models (research use only):
gpt-4 versions
- airoboros-65b-gpt4-1.4
- airoboros-33b-gpt4-1.4
- airoboros-mpt-30bb-gpt4-1.4
- airoboros-13b-gpt4-1.4
- airoboros-7b-gpt4-1.4
- older versions on HF as well
gpt-3.5-turbo versions
Datasets (subject to OpenAI license):
- airoboros-gpt-3.5-turbo
- airoboros-gpt4
- airoboros-gpt4-1.1
- airoboros-gpt4-1.2
- airoboros-gpt4-1.3
- airoboros-gpt4-1.4
- airoboros-gpt4-1.4.1 (recommended)
Coming soon
Scripts for fine-tuning various models using the self-instruct (and human-generated) prompts.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file airoboros-2.0.8.tar.gz
.
File metadata
- Download URL: airoboros-2.0.8.tar.gz
- Upload date:
- Size: 38.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c62a2cd2c9fc386370ea5ee0a61075d06c3e78962ceaa8512ed4fe3dd2d17b51 |
|
MD5 | 3b514340ab02e90cf6d1deb862191cf0 |
|
BLAKE2b-256 | 4aff9273f4cb2e8fca09dafad941f272c651a2394b294082efb56e8b062aaac3 |
File details
Details for the file airoboros-2.0.8-py3-none-any.whl
.
File metadata
- Download URL: airoboros-2.0.8-py3-none-any.whl
- Upload date:
- Size: 53.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 054c58c3cff3956d5c0d84b614333a48231afb5c8fbdc7270a5ecdc9a311fd6b |
|
MD5 | b82737f94036f9381be76b74606d96c7 |
|
BLAKE2b-256 | 677077709678f7c6f18e105de69a7db482549915ac25d9511d684e652033b03c |