-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
72 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
# llm-stack | ||
|
||
End-to-end tech stack for the LLM data flywheel. | ||
This tutorial series will show you how to build an end-to-end data flywheel for Large Language Models (LLMs). | ||
|
||
## Chapters | ||
We will be working on an entity recognition task with a custom set of entity types throughout the series. We will extract entities like `dataset`, `method`, `evaluation` and `task` from arXiv papers. | ||
|
||
- Building your training set with GPT-4 | ||
- Fine-tuning an open-source LLM | ||
- Evaluation | ||
- Human feedback | ||
- Unit tests | ||
- Deployment | ||
## What you will learn | ||
|
||
## Installation | ||
How to: | ||
|
||
TODO | ||
- Build a training set with GPT-4 or GPT-3.5 | ||
- Fine-tune an open-source LLM | ||
- Create a set of Evals to evaluate the model. | ||
- Collect human feedback to improve the model. | ||
- Deploy the model to an inference endpoint. | ||
|
||
## Fine-tuning | ||
## Software used | ||
|
||
### Data | ||
- [wandb](https://wandb.ai) for experiment tracking. This is where we will record all our artifacts (datasets, models, code) and metrics. | ||
- [modal](https://modal.com/) for running jobs on the cloud. | ||
- [huggingface](https://huggingface.co/) for all-things-LLM. | ||
- [argilla](https://docs.argilla.io/en/latest/) for labelling our data. | ||
|
||
## Tutorial 1 - Generating a training set with GPT-3.5 | ||
|
||
In this tutorial, we will use GPT-3.5 to generate a training set for our entity recognition task. | ||
|
||
## Contributing | ||
|
||
TODO | ||
Found any mistakes or want to contribute? Feel free to open a PR or an issue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type": "function", "function": {"name": "entity_recognition", "description": "extract all entities related to machine learning tasks, datasets, methods and benchmarks.", "parameters": {"type": "object", "properties": {"datasets": {"type": "array", "items": {"type": "string"}, "description": "A collection of data used to train, pretrain or fine-tune a machine learning model."}, "methods": {"type": "array", "items": {"type": "string"}, "description": "A machine learning model or algorithm. This also includes the type of model (e.g. transformer, CNN, RNN, etc.) and other relevant components like optimization algorithms, loss functions, etc."}, "evaluation": {"type": "array", "items": {"type": "string"}, "description": "They describe how a model is evaluated. This includes metrics, benchmarks, etc."}, "tasks": {"type": "array", "items": {"type": "string"}, "description": "A machine learning task (e.g. classification, question answering, summarization, etc.)."}}, "required": ["datasets", "methods", "evaluation", "tasks"]}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"role": "user", "content": "###Instructions###\nYou work on entity recognition. You will be given an academic abstract from arXiv. Your task is to extract all entities related to machine learning tasks, datasets, methods and benchmarks.\n\nHere is the definition of each entity you will extract:\n- Datasets: a collection of data used to train, pretrain or fine-tune a machine learning model.\n- Methods: a machine learning model or algorithm. This also includes the type of model (e.g. transformer, CNN, RNN, etc.) and other relevant components like optimization algorithms, loss functions, etc.\n- Benchmarks: a metric used to evaluate a machine learning model.\n- Tasks: a machine learning task (e.g. classification, question answering, summarization, etc.).\n\n###Constraints###\n- You must extract any abbreviations or acronyms too and consider them as distinct entities. For example, if you see \"Large Language Models (LLM)\", you must extract \"Large Language Models\" and \"LLM\" as two distinct entities.\n\n###Context###\n{text}\n"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from .openai_api import OpenAILLM | ||
from .prompt_template import FunctionTemplate | ||
from .prompt_template import MessageTemplate | ||
|
||
|
||
__all__ = ["OpenAILLM", "MessageTemplate"] | ||
__all__ = ["OpenAILLM", "MessageTemplate", "FunctionTemplate"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters