autollm
Easy data distillation of LLMs for text classification, information extraction, and open-ended tasks
autollm works like any AutoML libraries you would expect: input data, you get a trained model.
The twist is that you don’t have to provide annotations along with the data,
it is annotated automatically by an LLM (e.g. ChatGPT).
The second twist is that you don’t even have to provide data:
a meta-task of autollm is to detect relevant documents from large corpora (e.g. CommonCrawl).
Installation
via pip
pip install autollm
via uv
uv add autollm
editable
git clone https://github.com/PaulLerner/autollm.git
cd autollm
uv sync
Motivation
Since the release of ChatGPT, a large body of work in academia and industry have revolved around distilling general-purpose but compute-intensive LLMs (e.g. ChatGPT) into task-specific but compact classifiers (e.g. fineweb-edu) or LLMs (e.g. NuExtract3).
The industrial benefit is obvious, your company pays a monthly subscription for six months, collecting more than enough data to train a compact model that will cost a 100th of the price while keeping all data local.
Similar libraries
- DistillKit not "autoML" style, more of a technical toolkit/framework for knowledge distillation (from logits)
Roadmap
TODO link each with issues
- annotate: annotate text with an OpenAI-compatible API
- the task might be to detect relevant texts for the downstream task from a large-scale corpora (e.g. fineweb-edu)
- benchmark:
- accuracy of annotation against existing human annotations using sklearn metrics
- for information extraction: again use https://developers.openai.com/api/docs/guides/structured-outputs ? so single ClassifierIE class?
- for open-ended tasks: use https://developers.openai.com/api
- also provide alternative models
- claude
- gemini
- https://docs.vllm.ai/en/latest/api/vllm/index.html
- distill: train a compact model on the annotated dataset
- get list from transformers automodel?
- option for language (defaults multimodal)
- for sequence tagging: also encoder but token-wise classifier
- for open-ended: most likely decoder-only (or encoder-decoder?)
- also accept pre-annotated dataset (not from
autollm) - benchmark to compare against a human-engineered fine-tuning
- GLUE
- GUI
- deploy on server so that user doesn't need local compute
Contributing
Feel free to open an issue or PR to contribute. The roadmap will probably never happen without your help :)
Building
Use:
uv version --bump patchfor1.2.3 => 1.2.4uv version --bump minorfor1.2.3 => 1.3.0uv version --bump majorfor1.2.3 => 2.0.0
Then
uv build
uv publish --token=<TOKEN>
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file automl_llm-0.1.0.tar.gz.
File metadata
- Download URL: automl_llm-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
771f9687633e058bef97791253f91c7c520d9733a09b546d0ace93ae0fcf084f
|
|
| MD5 |
507de7dcb1daf7ef13ac2a7c5a1d31fa
|
|
| BLAKE2b-256 |
7511f6dc11fbe68ea48b190aa2b21dd4095dbf5609008d20b42973cd341a115f
|
File details
Details for the file automl_llm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: automl_llm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00b2982c47d280fd12fda0a759853c7a3b6dc06bc1c2922159725dc2e8a58a4d
|
|
| MD5 |
1ffd6422e9e7262e466867e3ba769ce8
|
|
| BLAKE2b-256 |
e7f5e5804e3223ac55c14c282556483fbe5a483c0907d20c4725a7b7547659bd
|