-
Notifications
You must be signed in to change notification settings - Fork 289
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
[Feature]: 不同的LLM模型,代码要以怎样的方式融合到项目里 #739
Comments
这个的确是缺失的重要特性之一,如果希望进行贡献,建议可以先看一下#715中的LLama text template,然后在这里提出你希望增加的API,我们会与你讨论并协助完善方案,随后就可以发起PR并合并。大概来讲,我觉得思路是设置一个Interface然后衍生出多种模型的模板实现,需要考虑到ChatCompletion和TextCompletion两种情况,以及与ChatSession的整合。在一开始可以只引入最基本的功能,但是需要注意实现的可扩展性。如果这一过程中有任何困难,请随时向我们寻求帮助。 请尽量使用英语在这里交流,LLamaSharp的绝大多数贡献者都不是中国人,使用英文会让更多的开发者可以参与讨论。 |
看了llama.cpp里关于模板的代码,在使用上,能开放给外部使用的空间和灵活度还是不够,特别是它内部未实现的模型。 After reviewing the template code in llama.cpp, I found that the space and flexibility for external use are still insufficient, particularly for the internally unimplemented models. Additionally, each new model will inevitably have a corresponding template solution. My idea is to create a custom package based on llamaSharp for different models, such as LlamaSharp.Phi3 and LlamaSharp.Qwen. These packages would include the model download (based on huggingface.co), configuration of the model text, and some personalized operations for the returned results. |
I'm not sure of it because I don't know how you would like to design the APIs, but integrating these functionalities in a separate package is certainly an option. If doing so, I'd prefer to add one package
I've already made a library for downloading models from Huggingface. Hope it will help you if you want to support model downloading. https://github.com/AsakusaRinne/HuggingfaceHub If you find any problem when making the contribution, please feel free to ask for help here or in the QQ/Discord group. |
Background & Description
经过测试,默认模板是无法作用应用于 Qwen1.5 模型里的,会出现结果混乱。
在增加自定义模板后,可以正常输出结果。
现在的想法是,类似常见的模型的问答模板,要怎样整合到 LLamaSharp 基础项目里。
API & Usage
No response
How to implement
No response
The text was updated successfully, but these errors were encountered: