GithubHelp home page GithubHelp logo

Comments (3)

AsakusaRinne avatar AsakusaRinne commented on September 26, 2024

这个的确是缺失的重要特性之一,如果希望进行贡献,建议可以先看一下#715中的LLama text template,然后在这里提出你希望增加的API,我们会与你讨论并协助完善方案,随后就可以发起PR并合并。大概来讲,我觉得思路是设置一个Interface然后衍生出多种模型的模板实现,需要考虑到ChatCompletion和TextCompletion两种情况,以及与ChatSession的整合。在一开始可以只引入最基本的功能,但是需要注意实现的可扩展性。如果这一过程中有任何困难,请随时向我们寻求帮助。

请尽量使用英语在这里交流,LLamaSharp的绝大多数贡献者都不是**人,使用英文会让更多的开发者可以参与讨论。

from llamasharp.

dogvane avatar dogvane commented on September 26, 2024

看了llama.cpp里关于模板的代码,在使用上,能开放给外部使用的空间和灵活度还是不够,特别是它内部未实现的模型。
并且,目前一个新模型,必定会存在与之对应着它的一个模板方案。
我的想法是,在llamaSharp的基础上,针对不同的模型,增加一个自定义包,例如:LlamaSharp.Phi3 LlamaSharp.Qwen 等。
包里继承了模型的下载(基于huggingface.co)针对它的模型文本的配置,以及返回结果的一些个性操作。

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.

from llamasharp.

AsakusaRinne avatar AsakusaRinne commented on September 26, 2024

My idea is to create a custom package based on llamaSharp for different models, such as LlamaSharp.Phi3 and LlamaSharp.Qwen.

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 LLamaSharp.Models instead of lots of packages of each supported model.

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'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.

from llamasharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.