Skip to content

Commit

Permalink
llama factory
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzheng422 committed Jan 10, 2025
1 parent 805984d commit 7b0b827
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions redhat/ocp4/4.16/2024.12.llama.factory.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,24 @@

Customer wants to try running [llama factory](https://github.com/hiyouga/LLaMA-Factory) on OpenShift AI. We know that we can run llama factory on openshift using deployment, but this requires additional configuration like image building and deployment configuration, like setting start up configuration parameters. The most difficult part is to get the master/head's ip address, and set to worker task's parameter to ensure that the workers can communicate with the master node.

> [!NOTE]
> In recently [commits](https://github.com/hiyouga/LLaMA-Factory/issues/6543), llama factory support ray, but with some limitation.
In this artical, we try to set up the openshift ai env, and start a llama factory distribution training task involving deepspeed.

The logic diagram illustrating the process flow for setting up and running LLaMA Factory on OpenShift AI:

![](./dia/ocp.ai.llama.factory.01.drawio.png)

The logic diagram illustrating the process flow for setting up and running LLaMA Factory on OpenShift AI with Ray:

![](./dia/ocp.ai.llama.factory.ray.drawio.png)

We will use such source code, listed here:
- https://github.com/wangzheng422/LLaMA-Factory/tree/wzh-stable/wzh
- [python notebook to run llama factory in python venv mode](./files/ray.notebook/2.5_run.llama.factory.ipynb)
- [python notebook to run llama factory in python direct mode (with deepspeed)](./files/ray.notebook/2.5_run.llama.factory.deepspeed.ipynb)
- [python notebook to run llama factory with build-in ray support](./files/ray.notebook/2.5_run.llama.factory.ray.ipynb)

# run using llama factory offical way

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7b0b827

Please sign in to comment.