Skip to content

Commit

Permalink
Merge pull request #35 from jozu-ai/main
Browse files Browse the repository at this point in the history
updating my fork - take 2
  • Loading branch information
brett-hodges authored Oct 8, 2024
2 parents 75debb7 + 11702f6 commit 957cda3
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 73 deletions.
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fjozu-ai%2Fkitops&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com)

[![Official Website](<https://img.shields.io/badge/-Visit%20the%20Official%20Website%20%E2%86%92-rgb(255,175,82)?style=for-the-badge>)](https://kitops.ml?utm_source=github&utm_medium=kitops-readme)
[![Use Cases](<https://img.shields.io/badge/-KitOps%20Quick%20Start%20%E2%86%92-rgb(122,140,225)?style=for-the-badge>)](https://kitops.ml/docs/quick-start.html?utm_source=github&utm_medium=kitops-readme)

[![Use Cases](<https://img.shields.io/badge/-KitOps%20Quick%20Start%20%E2%86%92-rgb(122,140,225)?style=for-the-badge>)](https://kitops.ml/docs/get-started.html?utm_source=github&utm_medium=kitops-readme)

### What is KitOps?

Expand All @@ -29,7 +30,7 @@ For our friends in the EU - ModelKits are the perfect way to create a library of

### 🎉 New

Get the most out of KitOps' ModelKits by using them with the **[Jozu Hub](https://jozu.ml/discover)** repository. Or, continue using ModelKits with your existing OCI registry (even on-premises and air-gapped).
Get the most out of KitOps' ModelKits by using them with the **[Jozu Hub](https://jozu.ml/)** repository. Or, continue using ModelKits with your existing OCI registry (even on-premises and air-gapped).


### Features
Expand All @@ -40,34 +41,32 @@ Get the most out of KitOps' ModelKits by using them with the **[Jozu Hub](https:
* 🪛 **[LLM fine-tuning](https://dev.to/kitops/fine-tune-your-first-large-language-model-llm-with-lora-llamacpp-and-kitops-in-5-easy-steps-1g7f):** Use KitOps to fine-tune a large language model using LoRA.
* 🎯 **[RAG pipelines](https://www.codeproject.com/Articles/5384392/A-Step-by-Step-Guide-to-Building-and-Distributing):** Create a RAG pipeline for tailoring an LLM with KitOps.
* 🔒 **[Tamper-proofing](https://kitops.ml/docs/modelkit/spec.html):** Each ModelKit package includes a SHA digest for itself, and every artifact it holds.
* 📝 **[Artifact signing](./docs/src/docs/next-steps.md):** ModelKits and their assets can be signed so you can be confident of their provenance.
* 📝 **[Artifact signing](https://kitops.ml/docs/next-steps.html):** ModelKits and their assets can be signed so you can be confident of their provenance.
* 🌈 **[Standards-based](https://kitops.ml/docs/modelkit/compatibility.html):** Store ModelKits in any OCI 1.1-compliant container or artifact registry.
* 🥧 **[Simple syntax](https://kitops.ml/docs/kitfile/kf-overview.html):** Kitfiles are easy to write and read, using a familiar YAML syntax.
* 🩰 **[Flexible](https://kitops.ml/docs/kitfile/format.html#model):** Reference base models using `model parts`, or store key-value pairs (or any YAML-compatible JSON data) in your Kitfile - use it to keep features, hyperparameters, links to MLOps tool experiments, or validation output.
* 🏃‍♂️‍➡️ **[Run locally](./docs/src/docs/dev-mode.md):** Kit's Dev Mode lets you run an LLM locally, configure it, and prompt/chat with it instantly.
* 🤗 **Universal:** ModelKits can be used with any AI, ML, or LLM project - even multi-modal models.
* 🐳 **Deploy containers:** Generate a Docker container as part of your `kit unpack` (coming soon).
* 🚢 **Kubernetes-ready:** Generate a Kubernetes / KServe deployment config as part of your `kit unpack` (coming soon).
* 🩰 **[Flexible](./docs/src/docs/kitfile/format.md):** Store key-value pairs, or any YAML-compatible JSON data in your Kitfile - use it to keep features, hyperparameters, links to MLOps tool experiments our validation output...whatever you want!
* 🤗 **Universal:** ModelKits can be used with any AI, ML, or LLM project - even multi-modal models.

### See KitOps in Action

There's a video of KitOps in action on the [KitOps site](https://kitops.ml/).

### What is in the box?

**[ModelKit](./docs/src/docs/modelkit/intro.md):** At the heart of KitOps is the ModelKit, an OCI-compliant packaging format for sharing all AI project artifacts: datasets, code, configurations, and models. By standardizing the way these components are packaged, versioned, and shared, ModelKits facilitate a more streamlined and collaborative development process that is compatible with any MLOps or DevOps tool.

**[Kitfile](./docs/src/docs/kitfile/kf-overview.md):** A ModelKit is defined by a Kitfile - your AI/ML project's blueprint. It uses YAML to describe where to find each of the artifacts that will be packaged into the ModelKit. Reading the Kitfile gives you a quick understanding of what's involved in each AI project.
**[ModelKit](https://kitops.ml/docs/modelkit/intro.html):** At the heart of KitOps is the ModelKit, an OCI-compliant packaging format for sharing all AI project artifacts: datasets, code, configurations, and models. By standardizing the way these components are packaged, versioned, and shared, ModelKits facilitate a more streamlined and collaborative development process that is compatible with any MLOps or DevOps tool.

**[Kit CLI](./docs/src/docs/cli/cli-reference.md):** The Kit CLI not only enables users to create, manage, run, and deploy ModelKits -- it lets you pull only the pieces you need. Just need the serialized model for deployment? Use `unpack --model`, or maybe you just want the training datasets? `unpack --datasets`.
**[Kitfile](https://kitops.ml/docs/kitfile/kf-overview.html):** A ModelKit is defined by a Kitfile - your AI/ML project's blueprint. It uses YAML to describe where to find each of the artifacts that will be packaged into the ModelKit. The Kitfile outlines what each part of the project is.

You can pull pre-built ModelKits from [Jozu Hub](https://jozu.ml/discover).
**[Kit CLI](https://kitops.ml/docs/cli/cli-reference.html):** The Kit CLI not only enables users to create, manage, run, and deploy ModelKits -- it lets you pull only the pieces you need. Just need the serialized model for deployment? Use `unpack --model`, or maybe you just want the training datasets? `unpack --datasets`.

## 🚀 Try KitOps in under 15 Minutes

1. [Install the CLI](./docs/src/docs/cli/installation.md) for your platform.
2. Follow the [ Quick Start](https://kitops.ml/docs/quick-start.html) to learn to pack, unpack, and share a ModelKit.
3. Test out one of our ModelKit Quick Starts which include everything thing you need to run your model including a codebase, dataset, documentation, and of course the model.
1. [Install the CLI](https://kitops.ml/docs/cli/installation.html) for your platform.
2. Follow the [Getting Started](https://kitops.ml/docs/get-started.html) docs to learn to pack, unpack, and share a ModelKit.
3. Test drive one of our [ModelKit Quick Starts](https://jozu.ml/organization/jozu-quickstarts) that include everything thing you need to run your model including a codebase, dataset, documentation, and of course the model.

- [Meta LLama 3.1](https://jozu.ml/repository/jozu/llama3.1-8b)
- [Google Gemma](https://jozu.ml/repository/jozu/gemma-7b)
Expand Down
61 changes: 26 additions & 35 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,61 +9,52 @@ As a public community project the KitOps roadmap is always open to feedback. If
## Roadmap
🛳️ = Shipped

🏃‍➡️= In-progress
🚗 = In-progress

### ModelKit Chaining 🛳️
📅 = Planned

A ModelKit can refer to another ModelKit's model as its "base model." This is useful for situations where a user wants to take an existing model (e.g., Llama 3) but create their own model based on it. The new ModelKit would include a reference to the Llama 3 ModelKit and Kit would understand to pull both when the user asks for the new ModelKit.
💡 = Idea (please provide feedback)

* Add chaining to ModelKit schema
* Add support for chaining to relevant Kit CLI commands
### Dev Mode Improvements

### Dev Mode 🏃‍➡️
* Change `kit dev` implementation to use [Llamafile](https://github.com/Mozilla-Ocho/llamafile?tab=readme-ov-file) 📅
* Export [Llamafile](https://github.com/Mozilla-Ocho/llamafile?tab=readme-ov-file) from ModelKit 📅
* Generate example code as the parameters and prompts are entered 💡
* A way to see JSON communicated between the server and responses 💡
* Hide the parameters that are not frequently changed 💡
* Add `kit dev` command to Kit CLI on *Windows* 💡
* Add `kit dev` command to Kit CLI on *Linux* 💡

Users can run a ModelKit packaged LLM on localhost and interact with it via chat or prompt through a beautiful and user-friendly UI. This speeds up running, testing, and integrating LLMs with applications.
### Tutorials

* Design UX for chat, prompt, and parameter interactions 🛳️
* Code UI for interactions focused on desktop form factor 🛳️
* Create ModelKits for popular LLMs 🛳️
* Add `dev` command to Kit CLI on *MacOS* 🛳️
* Generate example code as the parameters and prompts are entered 🏃‍➡️
* A way to see JSON communicated between the server and responses 🏃‍➡️
* Hide the parameters that are not frequently changed 🏃‍➡️
* Add `dev` command to Kit CLI on *Windows* (TBC)
* Add `dev` command to Kit CLI on *Linux* (TBC)
#### Demos

### Tutorials 🏃‍➡️
* Creating a ModelKit from a Jupyter Notebook 📅

Users can learn how to use ModelKits as part of a RAG pipeline, or while fine-tuning their LLM. Helps people get the most value out of ModelKits during their LLM development work.

* Tutorial: Fine-tuning LLMs using KitOps 🚢
* Tutorial: Doing RAG with KitOps 🏃‍➡️

### Signing 🏃‍➡️
### Signing

Users can optionally sign their ModelKit using something like Cosign in order to add an extra layer of security to their packaging.

* Decide on a signing utility 🏃‍➡️
* Add signing to Kit CLI 🏃‍➡️
* Add docs on signing and verifying to docs 🏃‍➡️

### Workflow Documentation 🏃‍➡️
* Add docs on signing and verifying to docs 🛳️
* Decide on a signing utility 💡
* Add signing to Kit CLI 💡

To help users understand how ModelKits fit into their existing workflows we will create documentation explaining how CI/CD/CT, observability, and other tasks can be simplified with KitOps.

### Deployment
### Deployment 💡

Users want to be able to deploy their models through existing CI/CD/CT pipelines. Since KitOps doesn't know the details of a user's deployment pipeline or process we will `unpack` a ModelKit into an appropriate directory structure for one of several deployment targets.

### CLI Distribution

Users want to be able to get the Kit CLI from locations like Brew, Choco, and Conda.

* Add support for Brew 🚗
* Create a Kit Python library 💡
* Add support for Choco 💡
* Add support for Conda 💡

### Attestation

This feature will come in two parts: build attestation and self-attestation. Build attestations will be done by KitOps itself, adding a SLSA attestation about how the ModelKit was built. ModelKit creators can add an optional attestation for specific assets in the ModelKit, or the whole ModelKit. Users can include any 3rd party attestation Verification Summary Attestation (VSA). Additional attestations could be added as predicates. Attestation would be included as a separate layer in the ModelKit.

* Add attestation for KitOps ModelKit builds
* Add mechanism for adding attestations to ModelKits
* Update CLI to make use of attestations
* Add CLI warnings if attestation was expected and not found
* Add provenance for KitOps ModelKit builds 💡
* Add CLI warnings if attestation was expected and not found 💡
2 changes: 1 addition & 1 deletion docs/discord-tracking.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Because our allegedly permanent discord links have needed to be refreshed a coup
* ./docs/.vitepress/theme/components/Footer.vue
* ./docs/.vitepress/theme/components/Home.vue
* ./docs/src/docs/next-steps.md
* ./docs/src/docs/quick-start.md
* ./docs/src/docs/get-started.md
29 changes: 19 additions & 10 deletions docs/src/docs/quick-start.md → docs/src/docs/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import vGaTrack from '@theme/directives/ga'
</script>

# KitOps Quick Start
# KitOps Getting Started

In this guide, we'll use ModelKits and the kit CLI to easily:
* Package up a model, notebook, and datasets into a single ModelKit you can share through your existing tools
Expand All @@ -28,7 +28,7 @@ You'll see information about the version of Kit you're running. If you get an er

### 2/ Login to Your Registry

You can use the [login command](./cli/cli-reference.md#kit-login) to authenticate with any OCI v1.1-compatible container registry - local or remote. In this guide we'll use the [Jozu Hub](https://jozu.ml/) because it's free to sign-up and provides more detail on what's inside each ModelKit and whether it's signed or has provenance. You can substitute your own repository if preferred.
You can use the [login command](./cli/cli-reference.md#kit-login) to authenticate with any OCI v1.1-compatible container registry - local or remote (you can see our [list of compliant registries](./modelkit/compatibility.md)). In this guide we'll use the [Jozu Hub](https://jozu.ml/) because it's free to sign-up and provides more detail on what's inside each ModelKit like whether it's signed or has provenance. You can substitute your own repository if preferred.

```sh
kit login jozu.ml
Expand All @@ -44,7 +44,7 @@ You can grab <a href="https://jozu.ml/discover"
v-ga-track="{
category: 'link',
label: 'grab any of the ModelKits',
location: 'docs/quick-start'
location: 'docs/get-started'
}">any of the ModelKits</a> from the Jozu Hub, but we've chosen a fine-tuned model based on Llama3.

The unpack command will unpack the ModelKit contents to the current directory by default. If you want it unpacked to a specific directory use the `-d /path/to/unpacked`.
Expand Down Expand Up @@ -80,15 +80,22 @@ You'll see the column headings for an empty table with things like `REPOSITORY`,

### 5/ Pack the ModelKit

Since our repository is empty we'll need use the [pack command](./cli/cli-reference.md#kit-pack) to create our ModelKit. The ModelKit in your local registry will need to be named the same as your remote registry. So the command will look like: `kit pack . -t [your registry address]/[your repository name]/mymodelkit:latest`
Since our repository is empty we'll need use the [pack command](./cli/cli-reference.md#kit-pack) to create our ModelKit. The ModelKit in your local registry will need to be named the same as your remote registry. The command will look like: `kit pack . -t [your registry address]/[your registry user or organization name]/[your repository name]:[your tag name]`

In my case I am pushing to the `brad` repository on [Jozu Hub](https://jozu.ml/). You'll need to substitute the name of your own repository:
In our case we are pushing a ModelKit tagged `latest` to:
* The [Jozu Hub](https://jozu.ml/) registry
* The `brad` user organization
* The `quick-start` repository

As a result, the command will look like:

```sh
kit pack . -t jozu.ml/brad/quick-start:latest
```

You'll see a set of `Saved ...` messages as each piece of the ModelKit is saved to the local repository.
You may need to substitute your own registry, user, repository, or tag names.

Once complete, you'll see a set of `Saved ...` messages as each piece of the ModelKit is saved to the local repository.

Check your local registry again:

Expand All @@ -102,21 +109,21 @@ You should see an entry named based on whatever you used in your pack command.

If you have a typo when packing a ModelKit you can easily remove it from your repository and try again. The [Next Steps guide includes information on how to remove ModelKits](./next-steps.md#remove-command).

Once you've removed the mistaken ModelKit from the repository, you can repeat the `kit pack` command in the previous step, being sure to provide the correct repository name for your ModelKit.
Once you've removed the mistaken ModelKit from the repository, you can repeat the `kit pack` command in the previous step, being sure to provide the correct organization and repository name for your ModelKit.

### 7/ Push the ModelKit to a Remote Repository

The [push command](./cli/cli-reference.md#kit-push) will copy the newly built ModelKit from your local repository to the remote repository you logged into earlier. The naming of your ModelKit will need to be the same as what you see in your `kit list` command (REPOSITORY:TAG). You can even copy and paste it. In my case it looks like:
The [push command](./cli/cli-reference.md#kit-push) will copy the newly built ModelKit from your local repository to the remote repository you logged into earlier. The naming of your ModelKit will need to be the same as what you see in your `kit list` command (REPOSITORY:TAG). You can even copy and paste it. In our case it looks like:

```sh
kit push jozu.ml/brad/quick-start:latest
```

Note that some registries, like Jozu Hub, don't automatically create a repository. If you receive an error from your `push` command, make sure you have created the repository in your target registry.
Note that some registries, like Jozu Hub, don't automatically create a repository. If you receive an error from your `push` command, make sure you have created the repository in your target registry and that you have push rights to the repository.

### Congratulations

You've learned how to unpack a ModelKit, pack one up, push it, and run an LLM locally. Anyone with access to your remote repository can now pull your new ModelKit and start playing with your model using the `kit pull` or `kit unpack` commands.
You've learned how to unpack a ModelKit, pack one up, and push it. Anyone with access to your remote repository can now pull your new ModelKit and start playing with your model using the `kit pull` or `kit unpack` commands.

If you'd like to learn more about using Kit, try our [Next Steps with Kit](./next-steps.md) document that covers:
* Signing your ModeKit
Expand All @@ -125,4 +132,6 @@ If you'd like to learn more about using Kit, try our [Next Steps with Kit](./nex
* Tagging ModelKits
* Keeping your registry tidy

Or, if you want to run an LLM-based ModelKit locally try our [dev mode](./dev-mode.md)

Thanks for taking some time to play with Kit. We'd love to hear what you think. Feel free to drop us an [issue in our GitHub repository](https://github.com/jozu-ai/kitops/issues) or join [our Discord server](https://discord.gg/3eDb4yAN).
10 changes: 3 additions & 7 deletions docs/src/docs/next-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ In this guide you'll learn how to:
* Read the Kitfile or manifest from a ModelKit
* Tag ModelKits and keep your registry tidy

::: info
If you're interested in running an LLM locally using Kit, you can jump to the [Kit Dev](./dev-mode.md) documentation.
:::

## Signing your ModelKit

Because ModelKits are OCI artifacts, they can be signed like any other OCI artifact (you may already sign your containers, for example).
Because ModelKits are OCI 1.1 artifacts, they can be signed like any other OCI artifact (you may already sign your containers, for example).

If you need a quick way to sign a ModelKit you can follow the same instructions as for a container, using something like [Cosign](https://docs.sigstore.dev/signing/quickstart).
If you need a quick way to sign a ModelKit you can follow the same instructions as for a container, using a tool like [Cosign](https://docs.sigstore.dev/cosign/signing/signing_with_containers/).


## Making your own Kitfile
Expand All @@ -30,7 +26,7 @@ A Kitfile is the configuration document for your ModelKit. It's written in YAML

A Kitfile only needs the `package` section, plus one or more of the other sections.

The `model` section can only contain a single model (you can chain models by using multiple ModelKits).
The `model` section can contain a single model, or you can create model dependencies with `model parts` which is covered in the [KitFile format documentation](https://kitops.ml/docs/kitfile/format.html#model).

The `datasets`, `code`, and `docs` sections are lists, so each entry must start with a dash. The dash is required even if you are only packaging a single item of that type.

Expand Down
Loading

0 comments on commit 957cda3

Please sign in to comment.