codara-model-trainer
Overview
The codara-model-trainer is a Python package designed to assist in creating datasets for fine-tuning machine learning
models, particularly language models. It simplifies the process of gathering and formatting training data in a JSON
Lines (JSONL) format.
Features
- Easy creation of training data sets in JSONL format.
- Methods to set system instructions, training prompts, and generative responses.
- Automatically handles file creation and appending data in the correct format.
Installation
pip install codara-model-trainer
Usage
- Create the data set with agent instructions, training prompts, and generative responses as needed:
from codara_model_trainer import create_data_set gpt_response = openai_api_call("User prompt here") create_data_set("System instructions here", "User prompt here", gpt_response, "optional-filepath/filename.jsonl")
The data will be saved in the model-training/fine-tune-data-set.jsonl file if the filepath isn't set.
Structure of Data
The data is structured in JSON Lines format, where each line is a valid JSON object. An example of the data structure:
{
"messages": [
{
"role": "system",
"content": "System instructions here"
},
{
"role": "user",
"content": "User prompt here"
},
{
"role": "assistant",
"content": "Model response here"
}
]
}
Metadata
Release files for codara-model-trainer 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| codara-model-trainer-2.0.0.tar.gz | 2.6 kB | Without provenance | Details for codara-model-trainer-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codara_model_trainer-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for codara_model_trainer-2.0.0-py3-none-any.whl |
Total release size: 5.8 kB
Release files / codara-model-trainer-2.0.0.tar.gz
| Download URL | codara-model-trainer-2.0.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fb466f5ad0885438933c900941b5e9dd8ca68a5cbe9d23f3c7c7179dc22d106
|
|
BLAKE2b-256 checksum How to use checksums |
5f97e1edffb5d36746a3b9c114d4714bf8187b87280364b48d696cbf2c0db90d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / codara_model_trainer-2.0.0-py3-none-any.whl
| Download URL | codara_model_trainer-2.0.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83877bed0cccc6f1031d872ff71f813f04e43a15c07c8da4970519628cdc4683
|
|
BLAKE2b-256 checksum How to use checksums |
eec35665642aac12ae2a885a4086ead4a113889414cb236007f377416866fd08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for codara-model-trainer 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.