Tim Miller
98bfbe1d50
Update
2 years ago
Tim Miller
3bca3b632e
New line
2 years ago
Tim Miller
9a1d6f99f2
Add Semantic Kernel support
2 years ago
Martin Evans
a70c7170dd
- Created a higher level `Grammar` class which is immutable and contains a list of grammar rules. This is the main "entry point" to the grammar system.
- Made all the mechanics of grammar parsing (GBNFGrammarParser, ParseState) internal. Just call `Grammar.Parse("whatever")`.
- Added a `GrammarRule` class which validates elements on construction (this allows constructing grammar without parsing GBNF).
- It should be impossible for a `GrammarRule` to represent an invalid rule.
2 years ago
SignalRT
fb007e5921
Changes to compile in VS Mac + change model to llama2
This commit includes changes to compile en VS Mac + changest to use llama2 not codellama.
It includes MacOS binaries in memory and metal
2 years ago
Martin Evans
40e76a70c5
Merge pull request #136 from Mihaiii/grammar_parser
Translating the grammar parser
2 years ago
Mihai
24d3e1bfa8
Address PR review comment
2 years ago
Mihai
60790c5aac
Address code review comments (create custom exception, move printing to the ParseState class, rethrow error).
2 years ago
Mihai
71f02e08c2
Add grammar example
2 years ago
Mihai
920efaca44
Add original test
2 years ago
Mihai
2ae1891c13
Bug fixes after running tests.
SymbolIds is now SortedDictionary (although I'm not sure it really needs to be) because the test was failing due to expected value being in another order. The C++ data structure if SymbolIds is std::map<std::string, uint32_t> so the items are ordered by key.
2 years ago
Mihai
0bd495276b
Add initial tests + fix bugs. Still WIP since the test is failing.
2 years ago
Mihai
0f373fcc6d
Finish grammar_parser translation from C++ to C#
2 years ago
Mihai
3c919b56fe
Use ReadOnlySpan everywhere instead of ReadOnlyMemeory and instead of returning tuple, reference the ReadOnlySpan.
2 years ago
Mihai
8b4ec6d973
Address PR change requests
2 years ago
Martin Evans
516c291e3f
Updated some of the docs
2 years ago
Mihai
7f31276bdf
[WIP] Translating the GrammarParser
2 years ago
Martin Evans
c9d08b943e
Added binaries for CUDA+Linux
2 years ago
Martin Evans
e34491855e
Merge pull request #135 from martindevans/really-fixed-cublas-paths
Fixed those cublas paths again
2 years ago
Martin Evans
229151ca37
Fixed those cublas paths again
2 years ago
Martin Evans
d0ca63fea5
Merge pull request #134 from martindevans/final-linux-cublas-fix
Fixed the cublas linux paths again
2 years ago
Martin Evans
dc4ef4f1a0
Fixed the cublas linux paths again
2 years ago
Martin Evans
82b7c1a475
Merge pull request #133 from martindevans/linux_cublas_final_path
fixed linux cublas paths in final step
2 years ago
Martin Evans
d695923711
fixed linux cublas paths in final step
2 years ago
Martin Evans
bdc1ea6560
Merge pull request #132 from martindevans/linux-cublas
Fixed linux cublas filenames
2 years ago
Martin Evans
c88717ace6
Fixed linux cublas file names
2 years ago
Martin Evans
c7096948c0
Fixed linux cublas filenames
2 years ago
Martin Evans
086fd5345c
Merge pull request #131 from martindevans/linux-cublas
Linux cublas
2 years ago
Martin Evans
e4dc543d24
Removed x86_64 macos build
2 years ago
Martin Evans
318ccd433f
Fixed linux cublas filepaths
2 years ago
Martin Evans
86398d400d
Added cublas target for Linux
2 years ago
Martin Evans
6711a59d0f
Included Linux deps
2 years ago
Martin Evans
ba49ea2991
Removed hardcoded paths from projects, modified Runtime.targets to exclude missing binaries
2 years ago
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
f86aa98300
Merge pull request #130 from martindevans/cublas_fix_paths
Fixed cuda paths again
2 years ago
Martin Evans
91ed8e8ccf
Fixed cuda paths again
2 years ago
Martin Evans
ea5d8a4695
Merge pull request #127 from martindevans/cublas_fix_paths
Fixed paths
2 years ago
Martin Evans
d076b723f5
Fixed paths
2 years ago
Martin Evans
5328f443b9
Dependency Building In Github Action ( #126 )
* new github action to build deps (manually triggered)
2 years ago
Martin Evans
974f16064a
Merge pull request #3 from saddam213/feature/gguf
Fix Tokenize of new line, Remove space inserts
2 years ago
sa_ddam213
a5d742b72c
Fix Tokenize of new line, Remove space inserts
2 years ago
Martin Evans
95dc12dd76
Switched to codellama-7b.gguf in tests (probably temporarily)
2 years ago
Martin Evans
31287b5e6e
Rewritten TokenToSpan/TokenToString to better fit the new way it's done in llama.cpp with a few different options:
- Just convert it to a `string`, nice and simple
- Write the bytes to a `Span<byte>` no allocations
- Write the chars to a `StringBuilder` potentially no allocations
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
964f497c50
Merge pull request #125 from martindevans/native_sampling_api_improvements
Removed unnecessary parameters from some low level sampler methods
2 years ago
Martin Evans
826c6aaec3
cleaned up higher level code using the sampling API:
- Fixed multiple enumeration
- Fixed newline penalisation
2 years ago
Martin Evans
cf4754db44
Removed unnecessary parameters from some low level sampler methods
2 years ago
Martin Evans
0ce5cf97fc
Merge pull request #124 from martindevans/native_sampling_api_improvements
Two small improvements to the native sampling API
2 years ago