Comments (3)
这个的确是缺失的重要特性之一,如果希望进行贡献,建议可以先看一下#715中的LLama text template,然后在这里提出你希望增加的API,我们会与你讨论并协助完善方案,随后就可以发起PR并合并。大概来讲,我觉得思路是设置一个Interface然后衍生出多种模型的模板实现,需要考虑到ChatCompletion和TextCompletion两种情况,以及与ChatSession的整合。在一开始可以只引入最基本的功能,但是需要注意实现的可扩展性。如果这一过程中有任何困难,请随时向我们寻求帮助。
请尽量使用英语在这里交流,LLamaSharp的绝大多数贡献者都不是**人,使用英文会让更多的开发者可以参与讨论。
from llamasharp.
看了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.
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)
- [BUG]: App crashes with CUDA error in ggml-cuda.cu:1503
- [BUG]: llama_encode has no implementation HOT 4
- Always getting a "Ċ" before EOS when using Qwen HOT 1
- [BUG]: Object Reference Error in ApplyPenalty when setting nl_logit HOT 3
- [BUG]: ChatHistory and kv-cache in unsync (Possible MemLeak) HOT 2
- [BUG]: Vulkan - bad output after a while HOT 3
- Ho can i get functions calls? HOT 7
- [BUG]: Null reference in AskAsync() HOT 1
- Error Loading LLAMA 3.1 llama_model_load: error loading model: done_getting_tensors: wrong number of tensors; expected 292, got 291[BUG]: HOT 4
- llamasharp provider for langchain.net is outdated HOT 2
- [BUG]: v0.14.0 hangs when initializing ModelParams HOT 3
- [BUG]: RTX 4080 - crash while loading Vulkan HOT 8
- [BUG]: Vulkan backend crash on model loading HOT 3
- [BUG]: Different continuation after restoring state HOT 1
- Improve `LLamaEmbedder` HOT 2
- [BUG]: KernelMemory.AskAsync() does not work - exception: object reference not set to an instance of an object HOT 25
- [BUG]: fatal error using gemma-2-2b-it HOT 3
- [BUG]: "The type or namespace 'Common' does not exist in the namespace 'LLama'" HOT 4
- Application Not Using GPU Despite Installing LlamaSharp.Backend.Cuda12 HOT 1
- [Feature]: Add development support for Dev Containers HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llamasharp.