tuna-cli 0.2.0
Fine tuning, reimagined. Welcome to tuna - we're simplifying cloud compute architecture, datasets, and more, to get your specialized AI from 0 to 1 ASAP.
Requires Python: >=3.12

# 🎣 Tuna

[![PyPi](https://img.shields.io/pypi/v/tuna-cli)](https://pypi.org/project/tuna-cli/)
![MacOS](https://img.shields.io/badge/MacOS-passing-dark_green.svg)
![Linux](https://img.shields.io/badge/Linux-passing-dark_green.svg)
![Windows](https://img.shields.io/badge/Windows-coming_soon-yellow.svg)
[![Support](https://img.shields.io/badge/KoFi-☕-black.svg)](https://ko-fi.com/abhiarya)
[![Star](https://img.shields.io/badge/Give_us_a_Star_on_GitHub!-purple.svg)](https://github.com/abhi-arya1/tuna)

#### _fine tuning, reimagined_

`tuna` is your _one stop (open-source) shop_ for fine tuning a code generation model on any codebase, available publically or privately on GitHub (more VCS support soon!).

We simplify the **entire** process, meaning that all you have to do to build out your perfect model, settings and all, is simply follow the initialization command below!

Don't have an NVIDIA GPU? Don't worry! Make sure you have an RSA SSH Key available at `~/.ssh/id_rsa.pub`, and set up an account and API key on our GPU provider, [FluidStack](https://fluidstack.io). Minimal prices, maximum development.

If you're concered about Data Privacy and Data Collection, note that Tuna does not collect _any_ data on you, and is entirely open source. Check out the "Data Collection" section below to learn more.

We'd love if you gave us a ⭐, as that's our primary way of tracking user interest! If you're feeling extra generous, you can click Sponsor ❤️. Thank you so much for reading!

Questions? Contact `abhi[at]opennote.me`.

**Note: Tuna is currently only supported on _MacOS_ and _Linux_, Windows is coming soon...**

# Documentation

## Getting Started

To install `tuna`, make sure you have `Python 3.12+` installed on your machine, then simply run the below command:

```bash
pip install tuna-cli
```

This will make `tuna` executable from anywhere on your machine.

## Commands

**1. Initialize**

```bash
tuna init

# Initializes a `.tuna` folder
# Authenticates your GitHub credentials
#   - This asks for a GitHub Token
#     which MUST have READ REPO and READ USER permissions
# Lets you select a repository
# Builds a Model Training Dataset
# Sets up Jupyter Environment
```

**2. Serve**

```bash
tuna serve
# Runs a Local Jupyter Environment with the
# autogenerated notebook and dataset,
# with CPU and Memory monitoring

# By default, this doesn't open the browser
# automatically. Run:
tuna serve --open
# to do that
```

**3. Refresh**

```bash
tuna refresh
# Recreates the dataset after updating
# from your GitHub project, in case you made
# edits after initializing with Tuna
```

<!-- 4. Edit

```bash
tuna --edit
# Edits the Tuna notebook in your
# .tuna directory
``` -->

**4. Train** (Coming Soon)

```bash
tuna train
# Begins to train the dataset with a powerful GPU from
# FluidStack (see intro)

# To train locally on current hardware, run
tuna train --local
# (must be on a device with an NVIDIA GPU, since Tuna relies on CUDA)
```

**5. Helpers**

```bash
tuna help
# or
tuna github
# or
tuna docs

# All of these will open the GitHub repository for Tuna, where all the documentation
# is served in the README.md file.
```

**6. Purge**

```bash
tuna purge

# This will delete all tuna-generated files
# in your current directory
# USE WITH CAUTION!
```

**7. No Flags**

```bash
tuna

# Displays a welcome message
```

## Data Collection

- After installation of the CLI tool, Tuna is entirely localized on your system. Outside of GPU rental services that we associate with to allow training, we don't store nor transfer _any_ data to any internal services. _Tuna_ is **_strictly open source_**.

- GitHub credentials including OAuth tokens, your username, and your stored repositories can be cleared by deleting the `.tuna` directory in the same spot that it was made, or by running `tuna purge` in that directory.

- FluidStack API keys are also stored locally, by deleting the `.tuna` directory in the same spot that it was made, or by running `tuna purge` in that directory

- All files pulled from GitHub are strictly stored in the datasets that you can find in the `.tuna` directory that gets made. We pull text directly from the GitHub API to save you unwanted files and dependency installs, and also to protect your environment variables.

- **Unless you share data explicity with us, we won't ever see your personal data.**

- _**Disclaimer:** We do not own the models that we use for fine tuning, and their data policies are on their invididual websites. Look up your model of choice to learn more._

### Licensing

- Tuna is licensed under the MIT license. For more information on usage, contact me at the email at the start of this README.

### Contributing

- Tuna is an Open-Source CLI tool built at [Opennote Labs](https://www.linkedin.com/company/opennote/).
- If you are interested in Contributing, take a look at [CONTRIBUTING.md](https://github.com/abhi-arya1/tuna/blob/main/CONTRIBUTING.md).

🎣 Happy Tun(a)ing!