Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
LLaMA-Factory
Commits
d1588ee7
Commit
d1588ee7
authored
Jul 18, 2025
by
chenych
Browse files
update 0718
parent
358bd2a0
Changes
43
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
tests/data/test_mm_plugin.py
tests/data/test_mm_plugin.py
+0
-1
tests/data/test_template.py
tests/data/test_template.py
+13
-0
tests/version.txt
tests/version.txt
+1
-1
No files found.
tests/data/test_mm_plugin.py
View file @
d1588ee7
...
@@ -238,7 +238,6 @@ def test_llama4_plugin():
...
@@ -238,7 +238,6 @@ def test_llama4_plugin():
_check_plugin
(
**
check_inputs
)
_check_plugin
(
**
check_inputs
)
@
pytest
.
mark
.
skipif
(
not
is_transformers_version_greater_than
(
"4.47.0"
),
reason
=
"Requires transformers>=4.47.0"
)
def
test_llava_plugin
():
def
test_llava_plugin
():
image_seqlen
=
576
image_seqlen
=
576
tokenizer_module
=
_load_tokenizer_module
(
model_name_or_path
=
"llava-hf/llava-1.5-7b-hf"
)
tokenizer_module
=
_load_tokenizer_module
(
model_name_or_path
=
"llava-hf/llava-1.5-7b-hf"
)
...
...
tests/data/test_template.py
View file @
d1588ee7
...
@@ -226,6 +226,19 @@ def test_gemma_template(use_fast: bool):
...
@@ -226,6 +226,19 @@ def test_gemma_template(use_fast: bool):
_check_template
(
"google/gemma-3-4b-it"
,
"gemma"
,
prompt_str
,
answer_str
,
use_fast
)
_check_template
(
"google/gemma-3-4b-it"
,
"gemma"
,
prompt_str
,
answer_str
,
use_fast
)
@
pytest
.
mark
.
skipif
(
not
HF_TOKEN
,
reason
=
"Gated model."
)
@
pytest
.
mark
.
parametrize
(
"use_fast"
,
[
True
,
False
])
def
test_gemma2_template
(
use_fast
:
bool
):
prompt_str
=
(
f
"<bos><start_of_turn>user
\n
{
MESSAGES
[
0
][
'content'
]
}
<end_of_turn>
\n
"
f
"<start_of_turn>model
\n
{
MESSAGES
[
1
][
'content'
]
}
<end_of_turn>
\n
"
f
"<start_of_turn>user
\n
{
MESSAGES
[
2
][
'content'
]
}
<end_of_turn>
\n
"
"<start_of_turn>model
\n
"
)
answer_str
=
f
"
{
MESSAGES
[
3
][
'content'
]
}
<end_of_turn>
\n
"
_check_template
(
"google/gemma-2-2b-it"
,
"gemma2"
,
prompt_str
,
answer_str
,
use_fast
)
@
pytest
.
mark
.
skipif
(
not
HF_TOKEN
,
reason
=
"Gated model."
)
@
pytest
.
mark
.
skipif
(
not
HF_TOKEN
,
reason
=
"Gated model."
)
@
pytest
.
mark
.
parametrize
(
"use_fast"
,
[
True
,
False
])
@
pytest
.
mark
.
parametrize
(
"use_fast"
,
[
True
,
False
])
def
test_llama3_template
(
use_fast
:
bool
):
def
test_llama3_template
(
use_fast
:
bool
):
...
...
tests/version.txt
View file @
d1588ee7
# change if test fails or cache is outdated
# change if test fails or cache is outdated
0.9.
3
.10
8
0.9.
4
.10
0
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment