Skip to content

Commit

Permalink
feat: sft script can take model and dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
jazelly committed Jun 11, 2024
1 parent 0a95d8d commit 993f3d5
Show file tree
Hide file tree
Showing 54 changed files with 2,217 additions and 1,828 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,4 @@ cython_debug/
#.idea/

checkpoint_dir/
results/
llama-2-7b*/
node_modules/
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"editor.formatOnSave": true,
"typescript.validate.enable": true
"editor.accessibilityPageSize": 12,
"editor.formatOnSave": true
}
136 changes: 68 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
# FinetuneLLMs (Work in Progress, Actively! 🔥)

Finetune an LLM, within a few clicks!

## 🔥Goal & Roadmap🔥

The main objective of this project is to lower the barrier to training large language models, especially for startup companies that have hardware on hand. With this project, it should be easy for a company to start experimenting with LLM training within a basic setup on servers with GPU/CPU resources.

In a way, it helps provide an opportunity for everyone who has hardware available and wants to utilize it in the AI field.

### [Roadmap](https://github.com/users/jazelly/projects/1/views/1)

## Supported finetuning techniques

| Model \ Method | SFT | DPO | ORPO | KTO | PRO |
| -------------- | --- | --- | ---- | --- | --- |
| llama 2 ||||||
| llama 3 ||||||
| gguf ||||||
| phi-3 ||||||
| Mistral ||||||
| ... | ? | ? | ? | ? | ? |

## General Setup

This repo provides 3 modules, `frontend `(react), `server` (nodejs), and `trainer` (python django)

You need CUDA for now, but once llama.cpp is integrated, this will no longer be required.

- For Linux

Install CUDA from [Nvidia installation guide](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/)

- For Windows (with Nvidia GPU)

Enable WSL2 on your machine.

Install CUDA from [Nvidia installation guide](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/)

## Dev Setup

Setup frontend

```
// copy .env.example to .env
cd frontend
npm ci
npm run dev
// or yarn && yarn dev
```

Setup server

```
// copy .env.example to .env and .env.development
cd server
npx prisma migrate dev
yarn
yarn dev
```

Setup trainer

```
cd trainer
pip install -r requirements.txt
daphne trainer.asgi:application
```
# FinetuneLLMs (Work in Progress, Actively! 🔥)

Finetune an LLM, within a few clicks!

## 🔥Goal & Roadmap🔥

The main objective of this project is to lower the barrier to training large language models, especially for startup companies that have hardware in hands. With this project, it should be easy for a company to start experimenting with LLM training within a basic setup on servers with GPU/CPU resources.

In a way, it helps provide an opportunity for everyone who has hardware available and wants to utilize it in the AI field.

### [Roadmap](https://github.com/users/jazelly/projects/1/views/1)

## Supported finetuning techniques

| Model \ Method | SFT | DPO | ORPO | KTO | PRO |
| -------------- | --- | --- | ---- | --- | --- |
| llama 2 ||||||
| llama 3 ||||||
| gguf ||||||
| phi-3 ||||||
| Mistral ||||||
| ... | ? | ? | ? | ? | ? |

## General Setup

This repo provides 3 modules, `frontend `(react), `server` (nodejs), and `trainer` (python django)

You need CUDA for now, but once llama.cpp is integrated, this will no longer be required.

- For Linux

Install CUDA from [Nvidia installation guide](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/)

- For Windows (with Nvidia GPU)

Enable WSL2 on your machine.

Install CUDA from [Nvidia installation guide](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/)

## Dev Setup

Setup frontend

```
// copy .env.example to .env
cd frontend
npm ci
npm run dev
// or yarn && yarn dev
```

Setup server

```
// copy .env.example to .env and .env.development
cd server
npx prisma migrate dev
yarn
yarn dev
```

Setup trainer

```
cd trainer
pip install -r requirements.txt
daphne trainer.asgi:application
```
6 changes: 3 additions & 3 deletions frontend/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VITE_API_BASE='http://localhost:3001/api' # Use this URL when developing locally
# VITE_API_BASE="https://$CODESPACE_NAME-3001.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN/api" # for Github Codespaces
# VITE_API_BASE='/api' # Use this URL deploying on non-localhost address OR in docker.
VITE_API_BASE='http://localhost:3001/api' # Use this URL when developing locally
# VITE_API_BASE="https://$CODESPACE_NAME-3001.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN/api" # for Github Codespaces
# VITE_API_BASE='/api' # Use this URL deploying on non-localhost address OR in docker.
Loading

0 comments on commit 993f3d5

Please sign in to comment.