Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

improve lm_eval get chatglm2 tokenizer from local saved files #1598

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

changwangss
Copy link
Contributor

@changwangss changwangss commented Jun 6, 2024

Type of Change

ticket https://jira.devtools.intel.com/browse/NLPTOOLKIU-1383
improve the tokenizer loading like the following code.

    tokenizer = AutoTokenizer.from_pretrained(
        "THUDM/chatglm2-6b", trust_remote_code=args.trust_remote_code
    )
    # save
    tokenizer.saved_pretrained("saved_results")
# load tokenizer
    tokenizer = AutoTokenizer.from_pretrained(
        args.model, trust_remote_code=args.trust_remote_code
    )

if args.model == "THUDM/chatglm2-6b", it works.
if args.model == "saved_results", it fails.

Description

detail description
JIRA ticket: xxx

Expected Behavior & Potential Risk

the expected behavior that triggered by this PR

How has this PR been tested?

how to reproduce the test (including hardware information)

Dependency Change?

any library dependency introduced or removed

@changwangss changwangss requested a review from PenghuiCheng as a code owner June 6, 2024 07:49
Copy link

github-actions bot commented Jun 6, 2024

⚡ Required checks status: All passing 🟢

Groups summary

🟢 Format Scan Tests workflow
Check ID Status Error details
format-scan (pylint) success
format-scan (bandit) success
format-scan (cloc) success
format-scan (cpplint) success

These checks are required after the changes to intel_extension_for_transformers/transformers/llm/evaluation/lm_eval/models/huggingface.py.

🟢 Optimize Unit Test workflow
Check ID Status Error details
optimize-unit-test-baseline success
optimize-unit-test-PR-test success
Genreate-OptimizeUT-Report success

These checks are required after the changes to intel_extension_for_transformers/transformers/llm/evaluation/lm_eval/models/huggingface.py.

🟢 NeuralChat Unit Test
Check ID Status Error details
neuralchat-unit-test-baseline success
neuralchat-unit-test-PR-test success
Generate-NeuralChat-Report success

These checks are required after the changes to intel_extension_for_transformers/transformers/llm/evaluation/lm_eval/models/huggingface.py.

🟢 Engine Unit Test workflow
Check ID Status Error details
engine-unit-test-baseline success
engine-unit-test-PR-test success
Genreate-Engine-Report success

These checks are required after the changes to intel_extension_for_transformers/transformers/llm/evaluation/lm_eval/models/huggingface.py.

🟢 Chat Bot Test workflow
Check ID Status Error details
call-inference-llama-2-7b-chat-hf / inference test success
call-inference-mpt-7b-chat / inference test success

These checks are required after the changes to intel_extension_for_transformers/transformers/llm/evaluation/lm_eval/models/huggingface.py.


Thank you for your contribution! 💜

Note
This comment is automatically generated and will be updates every 180 seconds within the next 6 hours. If you have any other questions, contact VincyZhang or XuehaoSun for help.

@chensuyue
Copy link
Contributor

@XuehaoSun please verify this fix.

@XuehaoSun XuehaoSun merged commit 5df1556 into main Jun 7, 2024
22 checks passed
@XuehaoSun XuehaoSun deleted the wangchang/lm_eval branch June 7, 2024 02:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants