Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LLaMA-Factory
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dbis-public
LLaMA-Factory
Commits
5b59ff42
Unverified
Commit
5b59ff42
authored
1 year ago
by
hoshi-hiyouga
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Update parser.py
parent
ec899ccc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/llmtuner/hparams/parser.py
+14
-4
14 additions, 4 deletions
src/llmtuner/hparams/parser.py
with
14 additions
and
4 deletions
src/llmtuner/hparams/parser.py
+
14
−
4
View file @
5b59ff42
...
...
@@ -82,12 +82,18 @@ def _check_extra_dependencies(
if
model_args
.
use_unsloth
:
require_version
(
"
unsloth
"
,
"
Please install unsloth: https://github.com/unslothai/unsloth
"
)
if
model_args
.
mixture_of_depths
:
require_version
(
"
mixture-of-depth
"
,
"
To fix: pip install mixture-of-depth
"
)
if
model_args
.
infer_backend
==
"
vllm
"
:
require_version
(
"
vllm>=0.3.3
"
,
"
To fix: pip install vllm>=0.3.3
"
)
if
finetuning_args
.
use_galore
:
require_version
(
"
galore_torch
"
,
"
To fix: pip install galore_torch
"
)
if
finetuning_args
.
use_badam
:
require_version
(
"
badam
"
,
"
To fix: pip install badam
"
)
if
training_args
is
not
None
and
training_args
.
predict_with_generate
:
require_version
(
"
jieba
"
,
"
To fix: pip install jieba
"
)
require_version
(
"
nltk
"
,
"
To fix: pip install nltk
"
)
...
...
@@ -151,6 +157,9 @@ def get_train_args(args: Optional[Dict[str, Any]] = None) -> _TRAIN_CLS:
if
training_args
.
do_train
and
training_args
.
predict_with_generate
:
raise
ValueError
(
"
`predict_with_generate` cannot be set as True while training.
"
)
if
training_args
.
do_train
and
model_args
.
quantization_device_map
==
"
auto
"
:
raise
ValueError
(
"
Cannot use device map for quantized models in training.
"
)
if
finetuning_args
.
use_dora
and
model_args
.
use_unsloth
:
raise
ValueError
(
"
Unsloth does not support DoRA.
"
)
...
...
@@ -169,14 +178,15 @@ def get_train_args(args: Optional[Dict[str, Any]] = None) -> _TRAIN_CLS:
raise
ValueError
(
"
Distributed training does not support layer-wise GaLore.
"
)
if
finetuning_args
.
use_galore
and
training_args
.
deepspeed
is
not
None
:
raise
ValueError
(
"
GaLore is incompatible with DeepSpeed.
"
)
raise
ValueError
(
"
GaLore is incompatible with DeepSpeed
yet
.
"
)
if
(
finetuning_args
.
use_badam
if
(
finetuning_args
.
use_badam
and
finetuning_args
.
badam_mode
==
"
layer
"
and
training_args
.
parallel_mode
.
value
==
"
distributed
"
):
raise
ValueError
(
"
BAdam with layer-wise mode is no
t support
ed in
distributed training
by now
, use ratio
mode instead
.
"
)
raise
ValueError
(
"
Layer-wise BAdam does not ye
t support distributed training, use ratio
-wise BAdam
.
"
)
if
model_args
.
infer_backend
==
"
vllm
"
:
raise
ValueError
(
"
vLLM backend is only available for API, CLI and Web.
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment