Martin Evans
2022b82947
Added binaries generated by this action: https://github.com/SciSharp/LLamaSharp/actions/runs/6002797872/job/16279896150
Based on this version: 6b73ef1201
2 years ago
Martin Evans
0c98ae1955
Passing ctx to `llama_token_nl(_ctx)`
2 years ago
Martin Evans
6ffa28f964
Removed `LLAMA_MAX_DEVICES` (not used)
2 years ago
Martin Evans
2056078aef
Initial changes required for GGUF support
2 years ago
Martin Evans
829f32b27d
- Added `Obsolete` attributes to the entire `OldVersion` namespace, so they can be removed in the future
- Minor changes to cleanup some of the compiler warnings
2 years ago
Martin Evans
d7f971fc22
Improved `NativeApi` file a bit:
- Added some more comments
- Modified `llama_tokenize` to not allocate
- Modified `llama_tokenize_native` to take a pointer instead of an array, allowing use with no allocations
- Removed GgmlInitParams (not used)
2 years ago
sa_ddam213
726987b761
Add native logging output
2 years ago
Martin Evans
2b2d3af26b
Moved `Eval` out of `Utils` and into `SafeLLamaContextHandle`
2 years ago
Martin Evans
2d811b2603
- Moved `GetLogits` into `SafeLLamaContextHandle`
- Added disposal check into `SafeLLamaContextHandle`
2 years ago
Martin Evans
cd3cf2b77d
- Moved tokenization from `Utils.Tokenize` into `SafeLLamaContextHandle.Tokenize`, one less thing in `Utils`.
- Also refactored it to return an `int[]` instead of an `IEnumerable<int>`, solving the "multiple enumeration" problems at the source!
2 years ago
Yaohui Liu
bb46a990d0
fix: add bug info for native api.
2 years ago
Martin Evans
afb9d24f3a
Added model `Tokenize` method
2 years ago
Martin Evans
369c915afe
Added TokenToString conversion on model handle
2 years ago
Martin Evans
b721072aa5
Exposed some extra model properties on safe handle
2 years ago
Martin Evans
f16aa58e12
Updated to use the new loading system in llama (llama_state). This new system has split model weights and contexts into two separate things, allowing one set of weights to be shared between many contexts.
This change _only_ implements the low level API and makes no effort to update the LlamaSharp higher level abstraction.
It is built upon llama `b3f138d`, necessary DLLs are **not** included in this commit.
2 years ago
Rinne
c5e8b3eba2
Merge pull request #56 from martindevans/memory_mapped_save_loading_and_saving
Memory Mapped LoadState/SaveState
2 years ago
Rinne
1b0523f630
Merge branch 'master' into master
2 years ago
Martin Evans
4d72420a04
Replaced `SaveState` and `LoadState` implementations. These new implementations map the file into memory and then pass the pointer directly into the native API. This improves things in two ways:
- A C# array cannot exceed 2,147,483,591 bytes. In my own use of LlamaSharp I encountered this limit.
- This saves an extra copy of the entire state data into a C# `byte[]`, so it should be faster.
This does _not_ fix some other places where `GetStateData` is used. I'll look at those in a separate PR.
2 years ago
SignalRT
56a37a0d7d
Update to lates llama.cpp
Adapt the interface change in llama_backend_init
2 years ago
unknown
dba866ffcf
Update API method name
2 years ago
Yaohui Liu
1062fe1a7e
feat: upgrade the native libraries.
2 years ago
Yaohui Liu
9850417a12
feat: update quantize native params.
2 years ago
Yaohui Liu
3bf74ec9b9
feat: add chat session for refactored code.
2 years ago
Yaohui Liu
264fb9a706
refactor: LLamaModel and LLamaExecutor.
2 years ago
Yaohui Liu
3a62f087fe
fix: encoding error when using other languages.
2 years ago
Yaohui Liu
18c2ff2395
refactor: instruct mode and examples.
2 years ago
Yaohui Liu
55d5a8ae51
fix: quantization error with fp16.
2 years ago
Yaohui Liu
19979f664a
feat: support loading and saving state.
2 years ago
Yaohui Liu
4314f64b9c
feat: add check for backend package.
2 years ago
Yaohui Liu
6ffcb5306b
refactor: use official api of quantization instead.
2 years ago
Yaohui Liu
118d410d52
build: revise build informations.
2 years ago
Yaohui Liu
856d6549de
build: add linux support.
2 years ago
Yaohui Liu
02524ae4eb
build: add package informations.
2 years ago
Yaohui Liu
d6a7997e46
feat: add gpt model.
2 years ago
Yaohui Liu
5a79edeb51
feat: add the framework and basic usages.
2 years ago