Commit 317a82e2 authored by chenych's avatar chenych
Browse files

Add QWQ-32B

parent 37b0ad9f
...@@ -4,11 +4,13 @@ API_HOST= ...@@ -4,11 +4,13 @@ API_HOST=
API_PORT= API_PORT=
API_KEY= API_KEY=
API_MODEL_NAME= API_MODEL_NAME=
API_VERBOSE=
FASTAPI_ROOT_PATH= FASTAPI_ROOT_PATH=
MAX_CONCURRENT= MAX_CONCURRENT=
# general # general
DISABLE_VERSION_CHECK= DISABLE_VERSION_CHECK=
FORCE_CHECK_IMPORTS= FORCE_CHECK_IMPORTS=
ALLOW_EXTRA_ARGS=
LLAMAFACTORY_VERBOSITY= LLAMAFACTORY_VERBOSITY=
USE_MODELSCOPE_HUB= USE_MODELSCOPE_HUB=
USE_OPENMIND_HUB= USE_OPENMIND_HUB=
...@@ -32,7 +34,7 @@ GRADIO_SERVER_PORT= ...@@ -32,7 +34,7 @@ GRADIO_SERVER_PORT=
GRADIO_ROOT_PATH= GRADIO_ROOT_PATH=
GRADIO_IPV6= GRADIO_IPV6=
# setup # setup
ENABLE_SHORT_CONSOLE=1 ENABLE_SHORT_CONSOLE=
# reserved (do not use) # reserved (do not use)
LLAMABOARD_ENABLED= LLAMABOARD_ENABLED=
LLAMABOARD_WORKDIR= LLAMABOARD_WORKDIR=
...@@ -162,6 +162,9 @@ cython_debug/ ...@@ -162,6 +162,9 @@ cython_debug/
# vscode # vscode
.vscode/ .vscode/
# uv
uv.lock
# custom .gitignore # custom .gitignore
ms_cache/ ms_cache/
hf_cache/ hf_cache/
......
...@@ -15,6 +15,7 @@ LLaMA Factory是一个大语言模型训练和推理的框架,支持了魔搭 ...@@ -15,6 +15,7 @@ LLaMA Factory是一个大语言模型训练和推理的框架,支持了魔搭
## 支持模型结构列表 ## 支持模型结构列表
| 模型名 | 模型大小 | Template | | 模型名 | 模型大小 | Template |
| ------------------------------------------------------------ | -------------------------------- | --------- | | ------------------------------------------------------------ | -------------------------------- | --------- |
| [Baichuan 2](https://huggingface.co/baichuan-inc) | 7B/13B | baichuan2 | | [Baichuan 2](https://huggingface.co/baichuan-inc) | 7B/13B | baichuan2 |
...@@ -23,11 +24,10 @@ LLaMA Factory是一个大语言模型训练和推理的框架,支持了魔搭 ...@@ -23,11 +24,10 @@ LLaMA Factory是一个大语言模型训练和推理的框架,支持了魔搭
| [Gemma 2](https://huggingface.co/google) | 2B/9B | gemma | | [Gemma 2](https://huggingface.co/google) | 2B/9B | gemma |
| [Llama 2](https://huggingface.co/meta-llama) | 7B/13B/70B | llama2 | | [Llama 2](https://huggingface.co/meta-llama) | 7B/13B/70B | llama2 |
| [Llama 3/Llama 3.1](https://huggingface.co/meta-llama) | 8B/70B | llama3 | | [Llama 3/Llama 3.1](https://huggingface.co/meta-llama) | 8B/70B | llama3 |
| [Qwen1.5 (Code/MoE)/Qwen2/Qwen2.5](https://huggingface.co/Qwen) | 0.5B/1.8B/4B/7B/14B/32B/72B | qwen | | [Qwen1.5 (Code/MoE)/Qwen2/Qwen2.5/QwQ](https://huggingface.co/Qwen) | 0.5B/1.8B/4B/7B/14B/32B/72B | qwen |
| [XVERSE](https://hf-mirror.com/xverse) | 7B/13B | xverse | | [XVERSE](https://hf-mirror.com/xverse) | 7B/13B | xverse |
| [OLMo](https://hf-mirror.com/allenai) | 1B/7B | olmo | | [OLMo](https://hf-mirror.com/allenai) | 1B/7B | olmo |
持续更新中... 持续更新中...
注意:本版本仅支持deepseek蒸馏模型的监督微调(SFT),可参考[deepseek-r1-distill_vllm](https://developer.sourcefind.cn/codes/modelzoo/deepseek-r1-distill_vllm) 注意:本版本仅支持deepseek蒸馏模型的监督微调(SFT),可参考[deepseek-r1-distill_vllm](https://developer.sourcefind.cn/codes/modelzoo/deepseek-r1-distill_vllm)
......
This diff is collapsed.
This diff is collapsed.
assets/wechat.jpg

164 KB | W: | H:

assets/wechat.jpg

167 KB | W: | H:

assets/wechat.jpg
assets/wechat.jpg
assets/wechat.jpg
assets/wechat.jpg
  • 2-up
  • Swipe
  • Onion skin
assets/wechat_npu.jpg

167 KB | W: | H:

assets/wechat_npu.jpg

167 KB | W: | H:

assets/wechat_npu.jpg
assets/wechat_npu.jpg
assets/wechat_npu.jpg
assets/wechat_npu.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -24,6 +24,7 @@ Currently we support datasets in **alpaca** and **sharegpt** format. ...@@ -24,6 +24,7 @@ Currently we support datasets in **alpaca** and **sharegpt** format.
"tools": "the column name in the dataset containing the tool description. (default: None)", "tools": "the column name in the dataset containing the tool description. (default: None)",
"images": "the column name in the dataset containing the image inputs. (default: None)", "images": "the column name in the dataset containing the image inputs. (default: None)",
"videos": "the column name in the dataset containing the videos inputs. (default: None)", "videos": "the column name in the dataset containing the videos inputs. (default: None)",
"audios": "the column name in the dataset containing the audios inputs. (default: None)",
"chosen": "the column name in the dataset containing the chosen answers. (default: None)", "chosen": "the column name in the dataset containing the chosen answers. (default: None)",
"rejected": "the column name in the dataset containing the rejected answers. (default: None)", "rejected": "the column name in the dataset containing the rejected answers. (default: None)",
"kto_tag": "the column name in the dataset containing the kto tags. (default: None)" "kto_tag": "the column name in the dataset containing the kto tags. (default: None)"
...@@ -150,6 +151,10 @@ An additional column `images` is required. Please refer to the [sharegpt](#share ...@@ -150,6 +151,10 @@ An additional column `images` is required. Please refer to the [sharegpt](#share
An additional column `videos` is required. Please refer to the [sharegpt](#sharegpt-format) format for details. An additional column `videos` is required. Please refer to the [sharegpt](#sharegpt-format) format for details.
### Multimodal Audio Dataset
An additional column `audios` is required. Please refer to the [sharegpt](#sharegpt-format) format for details.
## Sharegpt Format ## Sharegpt Format
### Supervised Fine-Tuning Dataset ### Supervised Fine-Tuning Dataset
...@@ -296,7 +301,7 @@ Regarding the above dataset, the *dataset description* in `dataset_info.json` sh ...@@ -296,7 +301,7 @@ Regarding the above dataset, the *dataset description* in `dataset_info.json` sh
- [Example dataset](mllm_demo.json) - [Example dataset](mllm_demo.json)
Multimodal image datasets require a `images` column containing the paths to the input images. Multimodal image datasets require an `images` column containing the paths to the input images.
The number of images should be identical to the `<image>` tokens in the conversations. The number of images should be identical to the `<image>` tokens in the conversations.
...@@ -374,6 +379,47 @@ Regarding the above dataset, the *dataset description* in `dataset_info.json` sh ...@@ -374,6 +379,47 @@ Regarding the above dataset, the *dataset description* in `dataset_info.json` sh
} }
``` ```
### Multimodal Audio Dataset
- [Example dataset](mllm_audio_demo.json)
Multimodal audio datasets require an `audios` column containing the paths to the input audios.
The number of audios should be identical to the `<audio>` tokens in the conversations.
```json
[
{
"conversations": [
{
"from": "human",
"value": "<audio>human instruction"
},
{
"from": "gpt",
"value": "model response"
}
],
"audios": [
"audio path (required)"
]
}
]
```
Regarding the above dataset, the *dataset description* in `dataset_info.json` should be:
```json
"dataset_name": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"audios": "audios"
}
}
```
### OpenAI Format ### OpenAI Format
The openai format is simply a special case of the sharegpt format, where the first message may be a system prompt. The openai format is simply a special case of the sharegpt format, where the first message may be a system prompt.
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
"tools": "数据集代表工具描述的表头名称(默认:None)", "tools": "数据集代表工具描述的表头名称(默认:None)",
"images": "数据集代表图像输入的表头名称(默认:None)", "images": "数据集代表图像输入的表头名称(默认:None)",
"videos": "数据集代表视频输入的表头名称(默认:None)", "videos": "数据集代表视频输入的表头名称(默认:None)",
"audios": "数据集代表音频输入的表头名称(默认:None)",
"chosen": "数据集代表更优回答的表头名称(默认:None)", "chosen": "数据集代表更优回答的表头名称(默认:None)",
"rejected": "数据集代表更差回答的表头名称(默认:None)", "rejected": "数据集代表更差回答的表头名称(默认:None)",
"kto_tag": "数据集代表 KTO 标签的表头名称(默认:None)" "kto_tag": "数据集代表 KTO 标签的表头名称(默认:None)"
...@@ -150,6 +151,10 @@ KTO 数据集需要提供额外的 `kto_tag` 列。详情请参阅 [sharegpt](#s ...@@ -150,6 +151,10 @@ KTO 数据集需要提供额外的 `kto_tag` 列。详情请参阅 [sharegpt](#s
多模态视频数据集需要提供额外的 `videos` 列。详情请参阅 [sharegpt](#sharegpt-格式) 多模态视频数据集需要提供额外的 `videos` 列。详情请参阅 [sharegpt](#sharegpt-格式)
### 多模态音频数据集
多模态音频数据集需要提供额外的 `audios` 列。详情请参阅 [sharegpt](#sharegpt-格式)
## Sharegpt 格式 ## Sharegpt 格式
### 指令监督微调数据集 ### 指令监督微调数据集
...@@ -374,6 +379,48 @@ KTO 数据集需要额外添加一个 `kto_tag` 列,包含 bool 类型的人 ...@@ -374,6 +379,48 @@ KTO 数据集需要额外添加一个 `kto_tag` 列,包含 bool 类型的人
} }
``` ```
### 多模态音频数据集
- [样例数据集](mllm_audio_demo.json)
多模态音频数据集需要额外添加一个 `audios` 列,包含输入音频的路径。
注意音频的数量必须与文本中所有 `<audio>` 标记的数量严格一致。
```json
[
{
"conversations": [
{
"from": "human",
"value": "<audio>人类指令"
},
{
"from": "gpt",
"value": "模型回答"
}
],
"audios": [
"音频路径(必填)"
]
}
]
```
对于上述格式的数据,`dataset_info.json` 中的*数据集描述*应为:
```json
"数据集名称": {
"file_name": "data.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"audios": "audios"
}
}
```
### OpenAI 格式 ### OpenAI 格式
OpenAI 格式仅仅是 sharegpt 格式的一种特殊情况,其中第一条消息可能是系统提示词。 OpenAI 格式仅仅是 sharegpt 格式的一种特殊情况,其中第一条消息可能是系统提示词。
......
...@@ -38,6 +38,20 @@ ...@@ -38,6 +38,20 @@
"assistant_tag": "assistant" "assistant_tag": "assistant"
} }
}, },
"mllm_audio_demo": {
"file_name": "mllm_audio_demo.json",
"formatting": "sharegpt",
"columns": {
"messages": "messages",
"audios": "audios"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant"
}
},
"mllm_video_demo": { "mllm_video_demo": {
"file_name": "mllm_video_demo.json", "file_name": "mllm_video_demo.json",
"formatting": "sharegpt", "formatting": "sharegpt",
...@@ -304,6 +318,38 @@ ...@@ -304,6 +318,38 @@
"response": "response" "response": "response"
} }
}, },
"open_thoughts": {
"hf_hub_url": "llamafactory/OpenThoughts-114k",
"formatting": "sharegpt",
"columns": {
"messages": "messages"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant",
"system_tag": "system"
}
},
"open_r1_math": {
"hf_hub_url": "llamafactory/OpenR1-Math-94k",
"formatting": "sharegpt",
"columns": {
"messages": "messages"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant",
"system_tag": "system"
}
},
"chinese_r1_distill": {
"hf_hub_url": "Congliu/Chinese-DeepSeek-R1-Distill-data-110k-SFT",
"ms_hub_url": "liucong/Chinese-DeepSeek-R1-Distill-data-110k-SFT"
},
"llava_1k_en": { "llava_1k_en": {
"hf_hub_url": "BUAADreamer/llava-en-zh-2k", "hf_hub_url": "BUAADreamer/llava-en-zh-2k",
"subset": "en", "subset": "en",
......
[
{
"messages": [
{
"content": "<audio>What's that sound?",
"role": "user"
},
{
"content": "It is the sound of glass shattering.",
"role": "assistant"
}
],
"audios": [
"mllm_demo_data/1.mp3"
]
},
{
"messages": [
{
"content": "<audio>What can you hear?",
"role": "user"
},
{
"content": "A woman is coughing.",
"role": "assistant"
}
],
"audios": [
"mllm_demo_data/2.wav"
]
},
{
"messages": [
{
"content": "<audio>What does the person say?",
"role": "user"
},
{
"content": "Mister Quiller is the apostle of the middle classes and we are glad to welcome his gospel.",
"role": "assistant"
}
],
"audios": [
"mllm_demo_data/3.flac"
]
}
]
FROM image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-ubuntu20.04-dtk24.04.2-py3.10
...@@ -17,16 +17,28 @@ ARG INSTALL_LIGER_KERNEL=false ...@@ -17,16 +17,28 @@ ARG INSTALL_LIGER_KERNEL=false
ARG INSTALL_HQQ=false ARG INSTALL_HQQ=false
ARG INSTALL_EETQ=false ARG INSTALL_EETQ=false
ARG PIP_INDEX=https://pypi.org/simple ARG PIP_INDEX=https://pypi.org/simple
ARG HTTP_PROXY=
# Set the working directory # Set the working directory
WORKDIR /app WORKDIR /app
# Set http proxy
RUN if [ -n "$HTTP_PROXY" ]; then \
echo "Configuring proxy..."; \
export http_proxy=$HTTP_PROXY; \
export https_proxy=$HTTP_PROXY; \
fi
# Install the requirements # Install the requirements
COPY requirements.txt /app COPY requirements.txt /app
RUN pip config set global.index-url "$PIP_INDEX" && \ RUN pip config set global.index-url "$PIP_INDEX" && \
pip config set global.extra-index-url "$PIP_INDEX" && \ pip config set global.extra-index-url "$PIP_INDEX" && \
python -m pip install --upgrade pip && \ python -m pip install --upgrade pip && \
python -m pip install -r requirements.txt if [ -n "$HTTP_PROXY" ]; then \
python -m pip install --proxy=$HTTP_PROXY -r requirements.txt; \
else \
python -m pip install -r requirements.txt; \
fi
# Copy the rest of the application into the image # Copy the rest of the application into the image
COPY . /app COPY . /app
...@@ -51,13 +63,30 @@ RUN EXTRA_PACKAGES="metrics"; \ ...@@ -51,13 +63,30 @@ RUN EXTRA_PACKAGES="metrics"; \
if [ "$INSTALL_EETQ" == "true" ]; then \ if [ "$INSTALL_EETQ" == "true" ]; then \
EXTRA_PACKAGES="${EXTRA_PACKAGES},eetq"; \ EXTRA_PACKAGES="${EXTRA_PACKAGES},eetq"; \
fi; \ fi; \
pip install -e ".[$EXTRA_PACKAGES]" if [ -n "$HTTP_PROXY" ]; then \
pip install --proxy=$HTTP_PROXY -e ".[$EXTRA_PACKAGES]"; \
else \
pip install -e ".[$EXTRA_PACKAGES]"; \
fi
# Rebuild flash attention # Rebuild flash attention
RUN pip uninstall -y transformer-engine flash-attn && \ RUN pip uninstall -y transformer-engine flash-attn && \
if [ "$INSTALL_FLASHATTN" == "true" ]; then \ if [ "$INSTALL_FLASHATTN" == "true" ]; then \
pip uninstall -y ninja && pip install ninja && \ pip uninstall -y ninja && \
pip install --no-cache-dir flash-attn --no-build-isolation; \ if [ -n "$HTTP_PROXY" ]; then \
pip install --proxy=$HTTP_PROXY ninja && \
pip install --proxy=$HTTP_PROXY --no-cache-dir flash-attn --no-build-isolation; \
else \
pip install ninja && \
pip install --no-cache-dir flash-attn --no-build-isolation; \
fi; \
fi
# Unset http proxy
RUN if [ -n "$HTTP_PROXY" ]; then \
unset http_proxy; \
unset https_proxy; \
fi fi
# Set up volumes # Set up volumes
......
# Use the Ubuntu 22.04 image with CANN 8.0.rc1 # Use the Ubuntu 22.04 image with CANN 8.0.rc1
# More versions can be found at https://hub.docker.com/r/ascendai/cann/tags # More versions can be found at https://hub.docker.com/r/ascendai/cann/tags
# FROM ascendai/cann:8.0.rc1-910-ubuntu22.04-py3.8 # FROM ascendai/cann:8.0.rc1-910-ubuntu22.04-py3.8
FROM ascendai/cann:8.0.rc1-910b-ubuntu22.04-py3.8 FROM ascendai/cann:8.0.0-910b-ubuntu22.04-py3.10
# FROM ascendai/cann:8.0.rc1-910-openeuler22.03-py3.8 # FROM ascendai/cann:8.0.rc1-910-openeuler22.03-py3.8
# FROM ascendai/cann:8.0.rc1-910b-openeuler22.03-py3.8 # FROM ascendai/cann:8.0.rc1-910b-openeuler22.03-py3.8
...@@ -12,16 +12,28 @@ ENV DEBIAN_FRONTEND=noninteractive ...@@ -12,16 +12,28 @@ ENV DEBIAN_FRONTEND=noninteractive
ARG INSTALL_DEEPSPEED=false ARG INSTALL_DEEPSPEED=false
ARG PIP_INDEX=https://pypi.org/simple ARG PIP_INDEX=https://pypi.org/simple
ARG TORCH_INDEX=https://download.pytorch.org/whl/cpu ARG TORCH_INDEX=https://download.pytorch.org/whl/cpu
ARG HTTP_PROXY=
# Set the working directory # Set the working directory
WORKDIR /app WORKDIR /app
# Set http proxy
RUN if [ -n "$HTTP_PROXY" ]; then \
echo "Configuring proxy..."; \
export http_proxy=$HTTP_PROXY; \
export https_proxy=$HTTP_PROXY; \
fi
# Install the requirements # Install the requirements
COPY requirements.txt /app COPY requirements.txt /app
RUN pip config set global.index-url "$PIP_INDEX" && \ RUN pip config set global.index-url "$PIP_INDEX" && \
pip config set global.extra-index-url "$TORCH_INDEX" && \ pip config set global.extra-index-url "$TORCH_INDEX" && \
python -m pip install --upgrade pip && \ python -m pip install --upgrade pip && \
python -m pip install -r requirements.txt if [ -n "$HTTP_PROXY" ]; then \
python -m pip install --proxy=$HTTP_PROXY -r requirements.txt; \
else \
python -m pip install -r requirements.txt; \
fi
# Copy the rest of the application into the image # Copy the rest of the application into the image
COPY . /app COPY . /app
...@@ -31,7 +43,17 @@ RUN EXTRA_PACKAGES="torch-npu,metrics"; \ ...@@ -31,7 +43,17 @@ RUN EXTRA_PACKAGES="torch-npu,metrics"; \
if [ "$INSTALL_DEEPSPEED" == "true" ]; then \ if [ "$INSTALL_DEEPSPEED" == "true" ]; then \
EXTRA_PACKAGES="${EXTRA_PACKAGES},deepspeed"; \ EXTRA_PACKAGES="${EXTRA_PACKAGES},deepspeed"; \
fi; \ fi; \
pip install -e ".[$EXTRA_PACKAGES]" if [ -n "$HTTP_PROXY" ]; then \
pip install --proxy=$HTTP_PROXY -e ".[$EXTRA_PACKAGES]"; \
else \
pip install -e ".[$EXTRA_PACKAGES]"; \
fi
# Unset http proxy
RUN if [ -n "$HTTP_PROXY" ]; then \
unset http_proxy; \
unset https_proxy; \
fi
# Set up volumes # Set up volumes
VOLUME [ "/root/.cache/huggingface", "/root/.cache/modelscope", "/app/data", "/app/output" ] VOLUME [ "/root/.cache/huggingface", "/root/.cache/modelscope", "/app/data", "/app/output" ]
......
...@@ -4,7 +4,7 @@ services: ...@@ -4,7 +4,7 @@ services:
dockerfile: ./docker/docker-npu/Dockerfile dockerfile: ./docker/docker-npu/Dockerfile
context: ../.. context: ../..
args: args:
INSTALL_DEEPSPEED: false INSTALL_DEEPSPEED: "false"
PIP_INDEX: https://pypi.org/simple PIP_INDEX: https://pypi.org/simple
container_name: llamafactory container_name: llamafactory
volumes: volumes:
......
...@@ -13,16 +13,28 @@ ARG INSTALL_FLASHATTN=false ...@@ -13,16 +13,28 @@ ARG INSTALL_FLASHATTN=false
ARG INSTALL_LIGER_KERNEL=false ARG INSTALL_LIGER_KERNEL=false
ARG INSTALL_HQQ=false ARG INSTALL_HQQ=false
ARG PIP_INDEX=https://pypi.org/simple ARG PIP_INDEX=https://pypi.org/simple
ARG HTTP_PROXY=
# Set the working directory # Set the working directory
WORKDIR /app WORKDIR /app
# Set http proxy
RUN if [ -n "$HTTP_PROXY" ]; then \
echo "Configuring proxy..."; \
export http_proxy=$HTTP_PROXY; \
export https_proxy=$HTTP_PROXY; \
fi
# Install the requirements # Install the requirements
COPY requirements.txt /app COPY requirements.txt /app
RUN pip config set global.index-url "$PIP_INDEX" && \ RUN pip config set global.index-url "$PIP_INDEX" && \
pip config set global.extra-index-url "$PIP_INDEX" && \ pip config set global.extra-index-url "$PIP_INDEX" && \
python -m pip install --upgrade pip && \ python -m pip install --upgrade pip && \
python -m pip install -r requirements.txt if [ -n "$HTTP_PROXY" ]; then \
python -m pip install --proxy=$HTTP_PROXY -r requirements.txt; \
else \
python -m pip install -r requirements.txt; \
fi
# Copy the rest of the application into the image # Copy the rest of the application into the image
COPY . /app COPY . /app
...@@ -44,13 +56,29 @@ RUN EXTRA_PACKAGES="metrics"; \ ...@@ -44,13 +56,29 @@ RUN EXTRA_PACKAGES="metrics"; \
if [ "$INSTALL_HQQ" == "true" ]; then \ if [ "$INSTALL_HQQ" == "true" ]; then \
EXTRA_PACKAGES="${EXTRA_PACKAGES},hqq"; \ EXTRA_PACKAGES="${EXTRA_PACKAGES},hqq"; \
fi; \ fi; \
pip install -e ".[$EXTRA_PACKAGES]" if [ -n "$HTTP_PROXY" ]; then \
pip install --proxy=$HTTP_PROXY -e ".[$EXTRA_PACKAGES]"; \
else \
pip install -e ".[$EXTRA_PACKAGES]"; \
fi
# Rebuild flash attention # Rebuild flash attention
RUN pip uninstall -y transformer-engine flash-attn && \ RUN pip uninstall -y transformer-engine flash-attn && \
if [ "$INSTALL_FLASHATTN" == "true" ]; then \ if [ "$INSTALL_FLASHATTN" == "true" ]; then \
pip uninstall -y ninja && pip install ninja && \ pip uninstall -y ninja && \
pip install --no-cache-dir flash-attn --no-build-isolation; \ if [ -n "$HTTP_PROXY" ]; then \
pip install --proxy=$HTTP_PROXY ninja && \
pip install --proxy=$HTTP_PROXY --no-cache-dir flash-attn --no-build-isolation; \
else \
pip install ninja && \
pip install --no-cache-dir flash-attn --no-build-isolation; \
fi; \
fi
# Unset http proxy
RUN if [ -n "$HTTP_PROXY" ]; then \
unset http_proxy; \
unset https_proxy; \
fi fi
# Set up volumes # Set up volumes
......
...@@ -98,7 +98,7 @@ FORCE_TORCHRUN=1 llamafactory-cli train examples/train_lora/llama3_lora_sft_ds3. ...@@ -98,7 +98,7 @@ FORCE_TORCHRUN=1 llamafactory-cli train examples/train_lora/llama3_lora_sft_ds3.
#### Supervised Fine-Tuning with Ray on 4 GPUs #### Supervised Fine-Tuning with Ray on 4 GPUs
```bash ```bash
USE_RAY=1 llamafactory-cli train examples/train_full/llama3_lora_sft_ray.yaml USE_RAY=1 llamafactory-cli train examples/train_lora/llama3_lora_sft_ray.yaml
``` ```
### QLoRA Fine-Tuning ### QLoRA Fine-Tuning
...@@ -170,6 +170,12 @@ llamafactory-cli export examples/merge_lora/llama3_lora_sft.yaml ...@@ -170,6 +170,12 @@ llamafactory-cli export examples/merge_lora/llama3_lora_sft.yaml
llamafactory-cli export examples/merge_lora/llama3_gptq.yaml llamafactory-cli export examples/merge_lora/llama3_gptq.yaml
``` ```
### Save Ollama modelfile
```bash
llamafactory-cli export examples/merge_lora/llama3_full_sft.yaml
```
### Inferring LoRA Fine-Tuned Models ### Inferring LoRA Fine-Tuned Models
#### Batch Generation using vLLM Tensor Parallel #### Batch Generation using vLLM Tensor Parallel
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment