ymcui / Chinese-LLaMA-Alpaca-2

中文LLaMA-2 & Alpaca-2大模型二期项目 + 64K超长上下文模型 (Chinese LLaMA-2 & Alpaca-2 LLMs with 64K long context models)
Apache License 2.0
7.01k stars 571 forks source link

ntk上下文扩展 #494

Closed tkone2018 closed 5 months ago

tkone2018 commented 6 months ago

提交前必须检查以下项目

问题类型

模型推理

基础模型

Chinese-Alpaca-2 (7B/13B)

操作系统

Linux

详细描述问题

generation_config = GenerationConfig( temperature=0.2, top_k=40, top_p=0.9, do_sample=True, num_beams=1, repetition_penalty=1.1, max_new_tokens=30000 ) 推理文件是inference_hf.py,采用ntk扩展,想问下是不是输入还是限制在4096了,请问下ntk是可以扩展输入的上下文吗,还是说我使用ntk后,还需要修改哪些部分才能扩展输入的上下文token数,谢谢

50f65d48fb70cf10b07d418af23e836

依赖情况(代码类问题务必提供)

# 请在此处粘贴依赖情况(请粘贴在本代码块里)

运行日志或截图

# 请在此处粘贴运行日志(请粘贴在本代码块里)
tkone2018 commented 6 months ago

还有就是请教下vllm推理是不是不支持ntk上下文扩展技术

iMountTai commented 6 months ago

max_new_token设置的太大,参数不对。而且NTK不是无限扩展,比如原来支持4k长度,NTK可扩展到8-12k。

tkone2018 commented 6 months ago

@iMountTai 好的,谢谢

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your consideration.

github-actions[bot] commented 5 months ago

Closing the issue, since no updates observed. Feel free to re-open if you need any further assistance.