mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-02 03:32:50 +08:00
[misc] fix project toml (#7067)
Former-commit-id: 96fd510e6a03eae7a1f41772e1d6b784df6d5d2e
This commit is contained in:
parent
96636c3729
commit
f4aa0a146c
@ -40,7 +40,7 @@ Choose your path:
|
||||
- **Documentation (WIP)**: https://llamafactory.readthedocs.io/zh-cn/latest/
|
||||
- **Colab**: https://colab.research.google.com/drive/1eRTPn37ltBbYsISy9Aw2NuI2Aq5CQrD9?usp=sharing
|
||||
- **Local machine**: Please refer to [usage](#getting-started)
|
||||
- **PAI-DSW**: [Llama3 Example](https://gallery.pai-ml.com/#/preview/deepLearning/nlp/llama_factory) | [Qwen2-VL Example](https://gallery.pai-ml.com/#/preview/deepLearning/nlp/llama_factory_qwen2vl)
|
||||
- **PAI-DSW**: [Llama3 Example](https://gallery.pai-ml.com/#/preview/deepLearning/nlp/llama_factory) | [Qwen2-VL Example](https://gallery.pai-ml.com/#/preview/deepLearning/nlp/llama_factory_qwen2vl) | [DeepSeek-R1-Distill Example](https://gallery.pai-ml.com/#/preview/deepLearning/nlp/llama_factory_deepseek_r1_distill_7b)
|
||||
- **Amazon SageMaker**: [Blog](https://aws.amazon.com/cn/blogs/china/a-one-stop-code-free-model-fine-tuning-deployment-platform-based-on-sagemaker-and-llama-factory/)
|
||||
|
||||
> [!NOTE]
|
||||
|
@ -42,7 +42,7 @@ https://github.com/user-attachments/assets/e6ce34b0-52d5-4f3e-a830-592106c4c272
|
||||
- **框架文档**:https://llamafactory.readthedocs.io/zh-cn/latest/
|
||||
- **Colab**:https://colab.research.google.com/drive/1d5KQtbemerlSDSxZIfAaWXhKr30QypiK?usp=sharing
|
||||
- **本地机器**:请见[如何使用](#如何使用)
|
||||
- **PAI-DSW**:[Llama3 案例](https://gallery.pai-ml.com/#/preview/deepLearning/nlp/llama_factory) | [Qwen2-VL 案例](https://gallery.pai-ml.com/#/preview/deepLearning/nlp/llama_factory_qwen2vl)
|
||||
- **PAI-DSW**:[Llama3 案例](https://gallery.pai-ml.com/#/preview/deepLearning/nlp/llama_factory) | [Qwen2-VL 案例](https://gallery.pai-ml.com/#/preview/deepLearning/nlp/llama_factory_qwen2vl) | [DeepSeek-R1-Distill 案例](https://gallery.pai-ml.com/#/preview/deepLearning/nlp/llama_factory_deepseek_r1_distill_7b)
|
||||
- **Amazon SageMaker**:[博客](https://aws.amazon.com/cn/blogs/china/a-one-stop-code-free-model-fine-tuning-deployment-platform-based-on-sagemaker-and-llama-factory/)
|
||||
|
||||
> [!NOTE]
|
||||
|
@ -4,12 +4,19 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "llamafactory"
|
||||
dynamic = ["version", "dependencies", "optional-dependencies", "classifiers", "keywords", "authors", "license", "description", "readme"]
|
||||
requires-python = ">=3.10"
|
||||
|
||||
[project.scripts]
|
||||
llamafactory-cli = "llamafactory.cli:main"
|
||||
lmf = "llamafactory.cli:main"
|
||||
dynamic = [
|
||||
"version",
|
||||
"dependencies",
|
||||
"optional-dependencies",
|
||||
"requires-python",
|
||||
"scripts",
|
||||
"authors",
|
||||
"description",
|
||||
"readme",
|
||||
"license",
|
||||
"keywords",
|
||||
"classifiers"
|
||||
]
|
||||
|
||||
[tool.ruff]
|
||||
target-version = "py38"
|
||||
|
@ -5,7 +5,7 @@ accelerate>=0.34.0,<=1.2.1
|
||||
peft>=0.11.1,<=0.12.0
|
||||
trl>=0.8.6,<=0.9.6
|
||||
tokenizers>=0.19.0,<=0.21.0
|
||||
gradio>=4.38.0,<=5.12.0
|
||||
gradio>=4.38.0,<=5.18.0
|
||||
pandas>=2.0.0
|
||||
scipy
|
||||
einops
|
||||
|
@ -13,6 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import json
|
||||
from typing import Optional
|
||||
|
||||
import fire
|
||||
from transformers import Seq2SeqTrainingArguments
|
||||
@ -45,7 +46,7 @@ def vllm_infer(
|
||||
top_k: int = 50,
|
||||
max_new_tokens: int = 1024,
|
||||
repetition_penalty: float = 1.0,
|
||||
seed: int = None,
|
||||
seed: Optional[int] = None,
|
||||
pipeline_parallel_size: int = 1,
|
||||
image_max_pixels: int = 768 * 768,
|
||||
image_min_pixels: int = 32 * 32,
|
||||
|
@ -1394,23 +1394,23 @@ LOCALES = {
|
||||
"use_galore": {
|
||||
"en": {
|
||||
"label": "Use GaLore",
|
||||
"info": "Use GaLore optimizer.",
|
||||
"info": "Use [GaLore](https://github.com/jiaweizzhao/GaLore) optimizer.",
|
||||
},
|
||||
"ru": {
|
||||
"label": "Использовать GaLore",
|
||||
"info": "Используйте оптимизатор GaLore.",
|
||||
"info": "Используйте оптимизатор [GaLore](https://github.com/jiaweizzhao/GaLore).",
|
||||
},
|
||||
"zh": {
|
||||
"label": "使用 GaLore",
|
||||
"info": "使用 GaLore 优化器。",
|
||||
"info": "使用 [GaLore](https://github.com/jiaweizzhao/GaLore) 优化器。",
|
||||
},
|
||||
"ko": {
|
||||
"label": "GaLore 사용",
|
||||
"info": "GaLore 최적화를 사용하세요.",
|
||||
"info": "[GaLore](https://github.com/jiaweizzhao/GaLore) 최적화를 사용하세요.",
|
||||
},
|
||||
"ja": {
|
||||
"label": "GaLore を使用",
|
||||
"info": "GaLore オプティマイザーを使用します。",
|
||||
"info": "[GaLore](https://github.com/jiaweizzhao/GaLore) オプティマイザーを使用します。",
|
||||
},
|
||||
},
|
||||
"galore_rank": {
|
||||
@ -1521,23 +1521,23 @@ LOCALES = {
|
||||
"use_apollo": {
|
||||
"en": {
|
||||
"label": "Use APOLLO",
|
||||
"info": "Use APOLLO optimizer.",
|
||||
"info": "Use [APOLLO](https://github.com/zhuhanqing/APOLLO) optimizer.",
|
||||
},
|
||||
"ru": {
|
||||
"label": "Использовать APOLLO",
|
||||
"info": "Используйте оптимизатор APOLLO.",
|
||||
"info": "Используйте оптимизатор [APOLLO](https://github.com/zhuhanqing/APOLLO).",
|
||||
},
|
||||
"zh": {
|
||||
"label": "使用 APOLLO",
|
||||
"info": "使用 APOLLO 优化器。",
|
||||
"info": "使用 [APOLLO](https://github.com/zhuhanqing/APOLLO) 优化器。",
|
||||
},
|
||||
"ko": {
|
||||
"label": "APOLLO 사용",
|
||||
"info": "APOLLO 최적화를 사용하세요.",
|
||||
"info": "[APOLLO](https://github.com/zhuhanqing/APOLLO) 최적화를 사용하세요.",
|
||||
},
|
||||
"ja": {
|
||||
"label": "APOLLO を使用",
|
||||
"info": "APOLLO オプティマイザーを使用します。",
|
||||
"info": "[APOLLO](https://github.com/zhuhanqing/APOLLO) オプティマイザーを使用します。",
|
||||
},
|
||||
},
|
||||
"apollo_rank": {
|
||||
@ -1648,23 +1648,23 @@ LOCALES = {
|
||||
"use_badam": {
|
||||
"en": {
|
||||
"label": "Use BAdam",
|
||||
"info": "Enable the BAdam optimizer.",
|
||||
"info": "Enable the [BAdam](https://github.com/Ledzy/BAdam) optimizer.",
|
||||
},
|
||||
"ru": {
|
||||
"label": "Использовать BAdam",
|
||||
"info": "Включите оптимизатор BAdam.",
|
||||
"info": "Включите оптимизатор [BAdam](https://github.com/Ledzy/BAdam).",
|
||||
},
|
||||
"zh": {
|
||||
"label": "使用 BAdam",
|
||||
"info": "使用 BAdam 优化器。",
|
||||
"info": "使用 [BAdam](https://github.com/Ledzy/BAdam) 优化器。",
|
||||
},
|
||||
"ko": {
|
||||
"label": "BAdam 사용",
|
||||
"info": "BAdam 옵티마이저를 사용합니다.",
|
||||
"info": "[BAdam](https://github.com/Ledzy/BAdam) 옵티마이저를 사용합니다.",
|
||||
},
|
||||
"ja": {
|
||||
"label": "BAdam を使用",
|
||||
"info": "BAdam オプティマイザーを使用します。",
|
||||
"info": "[BAdam](https://github.com/Ledzy/BAdam) オプティマイザーを使用します。",
|
||||
},
|
||||
},
|
||||
"badam_mode": {
|
||||
@ -1775,23 +1775,23 @@ LOCALES = {
|
||||
"use_swanlab": {
|
||||
"en": {
|
||||
"label": "Use SwanLab",
|
||||
"info": "Enable SwanLab for experiment tracking and visualization.",
|
||||
"info": "Enable [SwanLab](https://swanlab.cn/) for experiment tracking and visualization.",
|
||||
},
|
||||
"ru": {
|
||||
"label": "Использовать SwanLab",
|
||||
"info": "Включить SwanLab для отслеживания и визуализации экспериментов.",
|
||||
"info": "Включить [SwanLab](https://swanlab.cn/) для отслеживания и визуализации экспериментов.",
|
||||
},
|
||||
"zh": {
|
||||
"label": "使用 SwanLab",
|
||||
"info": "启用 SwanLab 进行实验跟踪和可视化。",
|
||||
"info": "启用 [SwanLab](https://swanlab.cn/) 进行实验跟踪和可视化。",
|
||||
},
|
||||
"ko": {
|
||||
"label": "SwanLab 사용",
|
||||
"info": "SwanLab를 사용하여 실험을 추적하고 시각화합니다.",
|
||||
"info": "[SwanLab](https://swanlab.cn/) 를 사용하여 실험을 추적하고 시각화합니다.",
|
||||
},
|
||||
"ja": {
|
||||
"label": "SwanLab を使用",
|
||||
"info": "SwanLab を有効にして実験の追跡と可視化を行います。",
|
||||
"info": "[SwanLab](https://swanlab.cn/) を有効にして実験の追跡と可視化を行います。",
|
||||
},
|
||||
},
|
||||
"swanlab_project": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user