Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

情感分类微调:测试输出出现大量positive和negative。 #4183

Closed
1 task done
un0o7 opened this issue Jun 10, 2024 · 3 comments
Closed
1 task done

情感分类微调:测试输出出现大量positive和negative。 #4183

un0o7 opened this issue Jun 10, 2024 · 3 comments
Labels
solved This problem has been already solved

Comments

@un0o7
Copy link

un0o7 commented Jun 10, 2024

Reminder

  • I have read the README and searched the existing issues.

System Info

linux

Reproduction

instruction = f'Judge whether the movie review is positive or negative.'
fine_tune_data = [{
    'instruction': instruction,
    'input': data['text'],
    'output': 'positive' if data['label'] == 1 else 'negative'
} for data in train_data]

json.dump(fine_tune_data, open('LLaMA-Factory/data/imdb.json', 'w'), indent=2)

模型的输出有大量的negative和positive,并且lora合并之后,推理速度明显下降。
image

Expected behavior

仅输出一个positive或negative

Others

No response

@github-actions github-actions bot added the pending This problem is yet to be addressed label Jun 10, 2024
@hiyouga
Copy link
Owner

hiyouga commented Jun 10, 2024

llama3 非 instruct 模型请用 template: default 微调

@hiyouga hiyouga added solved This problem has been already solved and removed pending This problem is yet to be addressed labels Jun 10, 2024
@hiyouga hiyouga closed this as completed Jun 10, 2024
@un0o7
Copy link
Author

un0o7 commented Jun 10, 2024

感谢大佬!

@nvliajia
Copy link

请问你微调分类任务有改动默认参数吗,为什么我微调后测试的时候发现有些答案不固定呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

No branches or pull requests

3 participants