From a247999ef429f642399f00afaf73886426f87a7f Mon Sep 17 00:00:00 2001 From: haixuantao Date: Tue, 4 Feb 2025 14:14:27 +0100 Subject: [PATCH] Add readme within llama factory --- node-hub/llama-factory-recorder/README.md | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/node-hub/llama-factory-recorder/README.md b/node-hub/llama-factory-recorder/README.md index 9279a6d6b..4603b7a29 100644 --- a/node-hub/llama-factory-recorder/README.md +++ b/node-hub/llama-factory-recorder/README.md @@ -1,3 +1,50 @@ # Dora Llama factory recorder Experimental node for recording for training llama based model. + +## Get started + +- Git clone llama-factory: + +```bash +git clone https://github.com/hiyouga/LLaMA-Factory --depth 1 $HOME +``` + +- Replace your AI model node with llama-factory-recorder node. + +Example: + +```yaml +- id: dora-qwenvl-recorder + build: pip install -e ../../node-hub/llama-factory-recorder + path: llama-factory-recorder + inputs: + image_right: reachy/image_right + ground_truth: key-interpolation/text + outputs: + - text + env: + DEFAULT_QUESTION: Respond to people. # Prompt to use + LLAMA_FACTORY_ROOT_PATH: $HOME/LLaMA-Factory # path to llama factory +``` + +- Run your dataflow and at the end of the run you will find your data within the llama factory folder. +- Modify `llama-factory/examples/train_lora/qwen2vl_lora_sft.yaml` so that the dataset is the one you want to use, + +```yaml,diff +- dataset: mllm_demo,identity # video: mllm_video_demo ++ dataset: dora_demo_1,identity` +``` + +- You can also choose the 2B model instead of the 7B model with + +```yaml,diff +- model_name_or_path: Qwen/Qwen2-VL-7B-Instruct ++ model_name_or_path: Qwen/Qwen2-VL-2B-Instruct +``` + +- Then + +```bash +llamafactory-cli train examples/train_lora/qwen2vl_lora_sft.yaml +```