Commit Graph

875 Commits

Author SHA1 Message Date
Rinne 609e2968ad
Merge branch 'master' of github.com:SciSharp/LLamaSharp into preview 2023-12-16 19:24:35 +08:00
Martin Evans c298ab828a
Merge pull request #368 from martindevans/context_set_seed
Context Set Seed
2023-12-15 23:42:47 +00:00
Martin Evans dc8e5d88f7
Update LLama/LLamaContext.cs 2023-12-15 23:14:39 +00:00
Martin Evans a3177ab140
Merge pull request #369 from martindevans/rename_llama_sample_temperature
Renamed `llama_sample_temperature` to `llama_sample_temp`
2023-12-15 23:13:45 +00:00
Martin Evans cbc4c8d9af
Merge pull request #370 from martindevans/copy_grammar
Clone Grammar
2023-12-15 23:10:11 +00:00
Martin Evans db7ecf5a43 Added a method to create a clone of a grammar instance 2023-12-15 23:01:05 +00:00
Martin Evans ea523d2e2a Renamed `llama_sample_temperature` to `llama_sample_temp`, Mirroring the same change made in llama.cpp 2023-12-15 22:58:26 +00:00
Martin Evans 2df3e7617e Added a method to set the RNG seed on the context 2023-12-15 22:55:04 +00:00
Martin Evans 8494fd5769
Merge pull request #367 from martindevans/fix_quantisation_pure_field
Added missing field to LLamaModelQuantizeParams
2023-12-15 22:53:10 +00:00
Martin Evans cedef5e45a Added the `pure` field to `LLamaModelQuantizeParams` (it's been added to llama.cpp) 2023-12-15 22:36:58 +00:00
Martin Evans 6650e683f4
Merge pull request #361 from martindevans/update_binaries_dec_2023
Updated Binaries December 2023
2023-12-15 22:19:16 +00:00
Rinne b79387fd76
Merge pull request #365 from Onkitova/preview
feat: using CUDA while decoupling from the CUDA Toolkit as a hard-dependency
2023-12-15 08:52:55 +08:00
Martin Evans 199b4418c3 Fixed JSON serialization for ModelParams 2023-12-14 20:24:22 +00:00
Martin Evans 6128c18824
Merge pull request #366 from asmirnov82/fix_code_in_readme
Fix documentation to reflect changes in ChatSession API
2023-12-14 20:04:50 +00:00
Aleksei Smirnov 8558d109b4 Fix documentation according to the changes in newer versions 2023-12-14 22:35:21 +03:00
Martin Evans 2f0deeadcd Implemented serialization for `MetadataOverride`. Deserialization is broken (converter is never called) 2023-12-14 16:11:31 +00:00
AlTonkas 4f1bda18b6 Using CUDA while decoupling from the CUDA Toolkit as a hard-dependency
Using CUDA while decoupling from the CUDA Toolkit as a hard-dependency

Possible solution for https://github.com/SciSharp/LLamaSharp/issues/350

Adding an alternative, fallback method of detection system-supported cuda version to make CUDA Toolkit installation optional. Technically, it uses output of the command line tool "nvidia-smi" (preinstalled with nvidia drivers), which also contains information about cuda version supported on system.

Can confirm it works only on Windows, but I suppose that similar approach can be utilized for Linux and MacOS as well. Didn't touch the code for these 2 platforms, nevertheless.

After that, cuda can be utilized simply by putting nvidia libraries from llama.cpp original repo, "bin-win-cublas-cu12.2.0-x64.zip" asset to the root folder of the built program. For example, to folder: "\LLama.Examples\bin\Debug\net8.0\".
2023-12-14 16:25:59 +03:00
Martin Evans b868b056f7 Added metadata overrides to `IModelParams` 2023-12-14 02:05:40 +00:00
Martin Evans b22d8b7495 - Added `GroupDisposable` to dispose a collection of items all together
- Renamed `LLamaModelKvOverride` to `LLamaModelMetadataOverride`
2023-12-14 01:23:45 +00:00
Martin Evans 5ad2cd1d3c Added a comment on the type itself 2023-12-14 01:23:44 +00:00
Martin Evans b0270b5788 Added comments on GGMLType 2023-12-14 01:23:44 +00:00
Martin Evans b3e576608b fixed safe handle 2023-12-14 01:23:44 +00:00
Martin Evans bab6b65b61 Added a safe handle for LLamaKvCacheView 2023-12-14 01:23:44 +00:00
Martin Evans 439d14a061 Updated binaries:
- build run: https://github.com/SciSharp/LLamaSharp/actions/runs/7196891440
 - commit: 9fb13f9584
2023-12-14 01:23:43 +00:00
Martin Evans 9813a30193
Merge pull request #358 from xbotter/unittest-net8
Upgrade unittest target framework to .NET 8.0
2023-12-14 01:22:57 +00:00
xbotter 340bbbcf48
Move JSON converter for TensorSplitsCollection 2023-12-14 09:10:31 +08:00
Martin Evans 728f7077d8
Merge pull request #360 from martindevans/macos_avx
Added AVX and AVX2 to MacOS x86_64 builds
2023-12-13 14:47:26 +00:00
Martin Evans 0b8422ea7f Added AVX and AVX2 to MacOS x86_64 builds 2023-12-13 14:46:43 +00:00
Martin Evans 01c7f1b4da
Update LLama/Common/ModelParams.cs 2023-12-12 16:56:51 +00:00
Martin Evans e6148c952e Fixed encoding of `Encoding` 2023-12-12 15:50:32 +00:00
xbotter df66d7e0c6
Upgrade unittest target framework to .net8 2023-12-12 19:08:34 +08:00
Martin Evans d87d654a34
Merge pull request #348 from martindevans/new_object_based_sampling_pipeline
Custom Sampling Pipelines
2023-12-11 21:40:53 +00:00
Martin Evans 50c1b2d52d
Merge pull request #344 from philippjbauer/master
Rebuilt ChatSession class
2023-12-11 19:00:43 +00:00
Martin Evans 8a2923a7bc
Merge pull request #352 from SciSharp/dependabot/nuget/xunit-2.6.3
build(deps): bump xunit from 2.6.2 to 2.6.3
2023-12-11 15:03:29 +00:00
Rinne fb75e06293
fix: output prefix of Chinese example. 2023-12-11 22:27:47 +08:00
dependabot[bot] 85dc43dde0
build(deps): bump xunit from 2.6.2 to 2.6.3
Bumps [xunit](https://github.com/xunit/xunit) from 2.6.2 to 2.6.3.
- [Commits](https://github.com/xunit/xunit/compare/2.6.2...2.6.3)

---
updated-dependencies:
- dependency-name: xunit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 14:26:14 +00:00
Martin Evans ec6d0e8778
Merge pull request #353 from SciSharp/dependabot/nuget/xunit.runner.visualstudio-2.5.5
build(deps): bump xunit.runner.visualstudio from 2.5.4 to 2.5.5
2023-12-11 14:24:56 +00:00
Rinne 836f071cd0
fix: Chinese example. 2023-12-11 22:21:54 +08:00
dependabot[bot] 8fb4476813
build(deps): bump xunit.runner.visualstudio from 2.5.4 to 2.5.5
Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.5.4 to 2.5.5.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](https://github.com/xunit/visualstudio.xunit/compare/2.5.4...2.5.5)

---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 06:20:24 +00:00
Philipp Bauer 29c5c6e93c Update the StatefulChatService to use new ChatSession integration 2023-12-10 09:34:32 -06:00
Philipp Bauer f669a4f5a7 Update the Chinese chat sample to use new ChatSession integration 2023-12-10 09:34:11 -06:00
Philipp Bauer 2cc01efdae
Merge branch 'SciSharp:master' into master 2023-12-10 08:59:01 -06:00
Rinne 3019da9d22
Merge pull request #341 from xbotter/sk/chat-stateless
🔧 Refactor Semantic Kernel chat completion implementation
2023-12-09 22:22:40 +08:00
Martin Evans 835958398c - Removed the object wrappers and configurable pipeline, they can be better written in code.
- Added BaseSamplingPipeline which provides a base impl of `ISamplingPipeline`
 - Added `DefaultSamplingPipeline` which mimics normal llama.cpp sampling
2023-12-08 16:25:13 +00:00
Martin Evans 3afc007499 - Added "protected" logits, instead of the awkward save/load mechanism
- Added an example usage to one of the tests
2023-12-08 01:17:24 +00:00
Martin Evans b34f72a883 - Added `SamplingPipeline` to inference params which overrides all other options with an entirely custom pipeline.
- Added a `Sample` method to `LLamaContext` which uses a custom pipeline
 - Modified all executors to use the custom pipeline if it exists
2023-12-08 01:02:27 +00:00
Martin Evans 4fc743c9ba
Merge branch 'master' into master 2023-12-07 23:49:33 +00:00
xbotter 22a775e1b0
Merge branch 'SciSharp:master' into sk/chat-stateless 2023-12-06 19:33:39 +08:00
Philipp Bauer 422605d980 Re-add ChatSession examples 2023-12-05 13:10:32 -06:00
Philipp Bauer 73d1725954 Modified / updated ChatSession examples 2023-12-05 13:10:27 -06:00