Martin Evans
64416ca23c
- Created a slightly nicer way to create grammar (from `IReadOnlyList<IReadOnlyList<LLamaGrammarElement>>`)
- Integrated grammar into sampling
- Added a test for the grammar sampling
2 years ago
Martin Evans
0294bb1303
Some of the basics of the grammar API
2 years ago
Rinne
62331852bc
Merge pull request #90 from martindevans/proposal_multi_context
Multi Context
2 years ago
Martin Evans
eab073bd2b
Merge pull request #104 from zerosoup/docs/sample-code-update
Add missing semi-colon to README sample code
2 years ago
Shaun Cook
81a26a27ec
Add missing semi-colon to README sample code
2 years ago
zombieguy
10f88ebd0e
Potential fix for .Net Framework issues ( #103 )
* Added a bool to sbyte Utils convertor
As an attempt to avoid using any MarshalAs attribute for .Net Framework support this Utils method will take in a bool value and return a 1 for true or 0 for false sbyte.
* Changed all bool "MarshalAs" types to sbytes
Changed all previous BOOL types with "MarshalAs" attributes to SBYTEs and changed all the setters of them to use the Utils.BoolToSignedByte() convertor method.
* Fixed Utils bool convertor & added sbyte to bool
Improved the Utils bool convertor just casting an sbyte value to get rid of the unneeded sbyte array and added an sbyte to bool convertor to convert back the way to a C# bool assuming any positive value above 0 is a bool and no bools are packed in the single byte integer.
* bool to & from sbyte conversions via properties
All 1byte bools are now handled where they "sit", via public properties which perform the conversions to keep all external data able to communicate as it did before.
2 years ago
Martin Evans
7ebff89f68
Merge pull request #101 from martindevans/llama_sample_classifier_free_guidance
llama_sample_classifier_free_guidance
2 years ago
Martin Evans
6c84accce8
Added `llama_sample_classifier_free_guidance` method from native API
2 years ago
Martin Evans
8e8cf1404d
Merge pull request #100 from martindevans/Logger_comments
Logger Comments
2 years ago
Martin Evans
afe559ef1c
Added comments to `Logger` and fixed some nullability warnings
2 years ago
Martin Evans
76d991f376
Removed embedding test, moved to another PR
2 years ago
Martin Evans
aeb7943710
Removed Console.WriteLine
2 years ago
Martin Evans
6473f8d5e5
Temporarily added a `Console.WriteLine` into the test, to print the embedding vector for "cat" in CI
2 years ago
Martin Evans
1b35be2e0c
Added some additional basic tests
2 years ago
Martin Evans
f5a260926f
Renamed `EmbeddingCount` to `EmbeddingSize` in higher level class
2 years ago
Martin Evans
479ff57853
Renamed `EmbeddingCount` to `EmbeddingSize`
2 years ago
Martin Evans
d0a7a8fcd6
- Cleaned up disposal in LLamaContext
- sealed some classes not intended to be extended
2 years ago
Martin Evans
4d741d24f2
Marked old `LLamaContext` constructor obsolete
2 years ago
Martin Evans
20bdc2ec6f
- Apply LoRA in `LLamaWeights.LoadFromFile`
- Sanity checking that weights are not disposed when creating a context from them
- Further simplified `Utils.InitLLamaContextFromModelParams`
2 years ago
Martin Evans
e2fe08a9a2
Added a higher level `LLamaWeights` wrapper around `SafeLlamaModelHandle`
2 years ago
Martin Evans
fda7e1c038
Fixed mirostat/mirostate
2 years ago
Martin Evans
f31bdf6b93
Using the right context for Bob
2 years ago
Martin Evans
f3511e390f
WIP demonstrating changes to support multi-context. You can see this in use in `TalkToYourself`, along with notes on what still needs improving.
The biggest single change is renaming `LLamaModel` to `LLamaContext`
2 years ago
Martin Evans
8fbb7e8eae
Merge pull request #99 from martindevans/native_api_improvements
Improved `NativeApi` file a bit
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
Martin Evans
8d4afdab2e
Added a known correct value to the unit tests
2 years ago
Martin Evans
841cf88e3b
Merge pull request #96 from martindevans/minor_quantizer_improvements
Minor quantizer improvements
2 years ago
Martin Evans
c6a0860920
Added a test for the LLamaEmbedder
2 years ago
Martin Evans
9b4d0e3bdd
Merge pull request #95 from saddam213/logging
Add native logging output
2 years ago
Martin Evans
ce325b49c7
Rewritten comments
2 years ago
Martin Evans
b69f4bc40e
- Expanded range of supported types in quantizer to match llama.cpp
- Rewritten `LLamaFtype` parsing to support any substring which uniquely matches a single enum variant
2 years ago
sa_ddam213
a67ea36dd9
Typo and formatting
2 years ago
sa_ddam213
726987b761
Add native logging output
2 years ago
Martin Evans
acd91341e6
Added lots of comments to all the LLamaFtype variants
2 years ago
Yaohui Liu
ee2a5f064e
Merge branch 'master' of github.com:SciSharp/LLamaSharp into rinne-dev
2 years ago
Yaohui Liu
3a1daa98a3
feat: add the api to get the embedding length of the model.
2 years ago
Martin Evans
270c6d55ef
Merge pull request #88 from martindevans/fix_serialization_nan
Fix serialization error due to NaN
2 years ago
Martin Evans
f612275dc0
Merge pull request #89 from martindevans/fix_use_mmap
Fixed `ToLlamaContextParams` using the wrong parameter for `use_mmap`
2 years ago
Martin Evans
91bcefc852
comment on IModelParamsExtensions
2 years ago
Martin Evans
9cdc72aa67
Fixed `ToLlamaContextParams` using the wrong parameter for `use_mmap`
2 years ago
Martin Evans
bab3b46f0c
Merge pull request #82 from martindevans/tokenization_cleanup
Utils Cleanup
2 years ago
Martin Evans
5b0d3ba610
Merge pull request #86 from saddam213/upstream_master
Access to IModelParamsExtensions
2 years ago
Martin Evans
b5de3ee5aa
Fixed some final mentions of "mirostate" instead of "mirostat"
2 years ago
Martin Evans
be52737488
Using a nullable float instead of NaN, this should fix the serialization issue reported in #85
2 years ago
sa_ddam213
2d1269cae9
Access to IModelParamsExtensions
2 years ago
Martin Evans
ad0aed5cdf
Merge branch 'master' into tokenization_cleanup
2 years ago
Martin Evans
1fceeaf352
Applied fix from #84 (antiprompt does not work in stateless executor)
2 years ago
Rinne
250c024402
Merge pull request #84 from SciSharp/rinne-dev
fix: antiprompt does not work in stateless executor.
2 years ago
Yaohui Liu
d609b0e1d5
Merge branch 'master' of github.com:SciSharp/LLamaSharp into rinne-dev
2 years ago
Yaohui Liu
b60c8bd285
fix: antiprompt does not work in stateless executor.
2 years ago