Commit Graph

1074 Commits

Author SHA1 Message Date
Martin Evans 82727c4414 Removed collection expressions from test 2024-01-02 21:12:38 +00:00
Martin Evans 2eb52b1630 made casts to/from int explicit, fixed places affected 2024-01-02 20:57:37 +00:00
Martin Evans 42be9b136d Switched form using raw integers, to a `LLamaToken` struct 2024-01-02 20:47:21 +00:00
Martin Evans 3abcaa51b5
Merge pull request #403 from martindevans/extra_models_params_checking
Extra ModelParams Checking
2024-01-02 19:20:42 +00:00
Martin Evans 48ef3bb080 Added runtime checks that UseMemoryLock and UseMemorymap are actually supported. 2024-01-02 19:14:21 +00:00
Martin Evans 9b9bcc0dbc
Merge pull request #402 from martindevans/safer_model_handle_creation
Safer Model Handle Creation
2024-01-02 19:13:34 +00:00
Martin Evans 4e5e994dda - directly returning a SafeLlamaModelHandle, instead of an IntPtr which is wrapped in a handle.
- made `llama_backend_init` private. This is automatically called, there is no way it can correctly be used externally.
 - made `llama_token_to_piece` safe (Span instead of pointer)
2024-01-02 18:18:48 +00:00
Martin Evans a1a8461802
Merge pull request #401 from martindevans/remove_some_unsafe
Removed some unnecessary uses of `unsafe`
2024-01-02 03:46:41 +00:00
Martin Evans bac3e43498 Fixed handling of empty spans 2024-01-02 03:42:54 +00:00
Martin Evans 3925545147 Fixed LLamaExecutorBase.cs 2024-01-02 03:41:16 +00:00
Martin Evans c002642268 - Removed some `unsafe` where it wasn't necessary
- Wrapped some native functions which take (pointer, length) in function which take a `span` instead.
2024-01-02 03:39:50 +00:00
Martin Evans 5c876cbbfe
Merge pull request #400 from martindevans/resharper_code_suggestions_cleanup_nativeapi
Code cleanup driven by R# suggestions
2024-01-02 03:26:55 +00:00
Martin Evans f860f88c36 Code cleanup driven by R# suggestions:
- Made `NativeApi` into a `static class` (it's not intended to be instantiated)
 - Moved `LLamaTokenType` enum out into a separate file
 - Made `LLamaSeqId` and `LLamaPos` into `record struct`, convenient to have equality etc
2024-01-02 03:20:21 +00:00
Martin Evans a408335c44 Fixed broken build on master (just removing a namespace that no longer exists) 2024-01-02 02:43:25 +00:00
Haiping feebd627f4
Merge pull request #396 from SciSharp/dependabot/nuget/Microsoft.KernelMemory.Core-and-Microsoft.KernelMemory.Abstractions-0.24.231228.5
build(deps): bump Microsoft.KernelMemory.Core and Microsoft.KernelMemory.Abstractions
2024-01-01 10:39:35 -06:00
Haiping a6e80c317c
Merge pull request #397 from SciSharp/dependabot/nuget/Microsoft.KernelMemory.Abstractions-0.24.231228.5
build(deps): bump Microsoft.KernelMemory.Abstractions from 0.18.231209.1-preview to 0.24.231228.5
2024-01-01 10:39:04 -06:00
Martin Evans 3b766089da Updated readme for 0.9.0 release 2024-01-01 16:04:01 +00:00
dependabot[bot] 89a43d8a12
build(deps): bump Microsoft.KernelMemory.Abstractions
Bumps [Microsoft.KernelMemory.Abstractions](https://github.com/microsoft/kernel-memory) from 0.18.231209.1-preview to 0.24.231228.5.
- [Release notes](https://github.com/microsoft/kernel-memory/releases)
- [Commits](https://github.com/microsoft/kernel-memory/compare/dotnet-0.18.231209.1-preview...0.24.231228.5)

---
updated-dependencies:
- dependency-name: Microsoft.KernelMemory.Abstractions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 06:14:31 +00:00
dependabot[bot] f02b0500b5
build(deps): bump Microsoft.KernelMemory.Core and Microsoft.KernelMemory.Abstractions
Bumps [Microsoft.KernelMemory.Core](https://github.com/microsoft/kernel-memory) and [Microsoft.KernelMemory.Abstractions](https://github.com/microsoft/kernel-memory). These dependencies needed to be updated together.

Updates `Microsoft.KernelMemory.Core` from 0.18.231209.1-preview to 0.24.231228.5
- [Release notes](https://github.com/microsoft/kernel-memory/releases)
- [Commits](https://github.com/microsoft/kernel-memory/compare/dotnet-0.18.231209.1-preview...0.24.231228.5)

Updates `Microsoft.KernelMemory.Abstractions` from 0.18.231209.1-preview to 0.24.231228.5
- [Release notes](https://github.com/microsoft/kernel-memory/releases)
- [Commits](https://github.com/microsoft/kernel-memory/compare/dotnet-0.18.231209.1-preview...0.24.231228.5)

---
updated-dependencies:
- dependency-name: Microsoft.KernelMemory.Core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Microsoft.KernelMemory.Abstractions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 06:13:58 +00:00
Martin Evans 39bc26882f
Merge pull request #388 from SciSharp/dependabot/nuget/Swashbuckle.AspNetCore-6.5.0
build(deps): bump Swashbuckle.AspNetCore from 6.4.0 to 6.5.0
2023-12-25 21:36:38 +00:00
Martin Evans d64c70e58e
Merge pull request #391 from SciSharp/dependabot/nuget/xunit.runner.visualstudio-2.5.6
build(deps): bump xunit.runner.visualstudio from 2.5.5 to 2.5.6
2023-12-25 21:35:55 +00:00
dependabot[bot] 57fdac493a
build(deps): bump xunit.runner.visualstudio from 2.5.5 to 2.5.6
Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.5.5 to 2.5.6.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](https://github.com/xunit/visualstudio.xunit/compare/2.5.5...2.5.6)

---
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-25 21:28:44 +00:00
Martin Evans a96f8da77b
Merge pull request #389 from SciSharp/dependabot/nuget/xunit-2.6.4
build(deps): bump xunit from 2.6.3 to 2.6.4
2023-12-25 21:24:45 +00:00
dependabot[bot] 58e5a84d54
build(deps): bump xunit from 2.6.3 to 2.6.4
Bumps [xunit](https://github.com/xunit/xunit) from 2.6.3 to 2.6.4.
- [Commits](https://github.com/xunit/xunit/compare/2.6.3...2.6.4)

---
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-25 06:18:18 +00:00
dependabot[bot] 492981718d
build(deps): bump Swashbuckle.AspNetCore from 6.4.0 to 6.5.0
Bumps [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) from 6.4.0 to 6.5.0.
- [Release notes](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/releases)
- [Commits](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/compare/v6.4.0...v6.5.0)

---
updated-dependencies:
- dependency-name: Swashbuckle.AspNetCore
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 06:18:05 +00:00
Martin Evans 95b9e4d2c7
Merge pull request #385 from martindevans/partial_fix_metadata_override
Metadata Fixes
2023-12-24 22:25:08 +00:00
Martin Evans 889d99bfe2
Merge pull request #386 from edgett/patch-1
Update compile.yml to fix not building for windows
2023-12-24 22:24:57 +00:00
edgett b6dec83ca9
Update compile.yml to fix not building for windows
This fixes the build step: Compile (Windows) (avx512, -DLLAMA_AVX512=ON -LLAMA_AVX512_VBMI=ON -DLLAMA_AVX512_VNNI=ON)

There is a typo in the cmake command: `cmake .. -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_SERVER=OFF -DBUILD_SHARED_LIBS=ON -DLLAMA_AVX512=ON -LLAMA_AVX512_VBMI=ON -DLLAMA_AVX512_VNNI=ON
  cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}`

-LLAMA_AVX512_VBMI
Should be
-DLLAMA_AVX512_VBMI
2023-12-24 17:20:46 -05:00
Martin Evans 2cded1b296 Fixed alignment of value fields in `LLamaModelMetadataOverride` 2023-12-24 22:02:22 +00:00
Martin Evans 3fc0f34cbe Fixed some issues which were causing metadata overrides not to work (mostly importantly, converting the key was failing so all keys were null bytes and thus ignored). 2023-12-24 21:23:37 +00:00
Martin Evans 82baee7133
Merge pull request #384 from martindevans/fixed_metadata_large_values
Fixed loading of very large metadata values
2023-12-24 20:09:42 +00:00
Martin Evans 6be3f62321 Fixed loading of very large metadata values (over 1kb) 2023-12-24 20:01:53 +00:00
Martin Evans f0d7468b22
Merge pull request #356 from xbotter/deps/sk-rc3
bump sk to 1.0.1 & km to 0.18
2023-12-21 17:24:19 +00:00
Martin Evans bf6fc38b58
Merge pull request #377 from scotmcc/master
Updated & Fixed WebAPI
2023-12-21 16:04:33 +00:00
Martin Evans 9b1ff0ba4e
Merge pull request #380 from martindevans/LLamaWeights.Metadata_Property
Added `LLamaWeights.Metadata` property
2023-12-21 14:56:28 +00:00
xbotter 211ce12bf5
LLamaEmbedder exposes the Context 2023-12-21 10:28:37 +08:00
Martin Evans fb606c2488 Fixed incorrect values 2023-12-20 16:30:28 +00:00
Martin Evans 47e4fcef2a Fixed GetString on netstandard2 2023-12-20 16:05:54 +00:00
Martin Evans 2a1e1b6183 Removed unused imports 2023-12-20 15:47:09 +00:00
Martin Evans a2bae178fa Added a `Metadata` property to `LLamaWeights` 2023-12-20 15:45:24 +00:00
xbotter 40ac944fb5
Bump sk to 1.0.1 2023-12-19 08:42:01 +08:00
Scot McConnaughay 2abc2ecfca Fixed WebAPI
Upgraded to .NET8.0
Fixed logging (removed Console replaced with Ilogger)
Fixed warnings (Null Strings, etc).

The application now returns data from the back-end chat services.
2023-12-18 09:03:48 -07:00
Rinne 4635185767
Merge pull request #378 from asmirnov82/fix_docs
Fix broken references in docs
2023-12-18 23:38:22 +08:00
Aleksei Smirnov 1c88bd5a74 fix broken references in docs (after commit "docs: update the docs to follow new version") 2023-12-18 15:53:15 +03:00
Martin Evans 7139281e4d
Merge pull request #373 from martindevans/enhanced_avx512
Improved support for AVX512
2023-12-16 15:52:32 +00:00
Martin Evans a0232a8534
Merge pull request #372 from martindevans/custom_pipeline_stateless_reset
Reset Custom Sampling Pipeline
2023-12-16 15:52:03 +00:00
Martin Evans 1b13f7c717 Improved support for AVX512:
- Enabled more features in build process (VBMI and VNNI)
 - Added runtime checking for this features
 - Improved runtime checking to no longer require dotnet8.0
2023-12-16 15:46:28 +00:00
Martin Evans 82d84afaea Resetting the custom sampling pipeline in the stateless executor 2023-12-16 14:48:40 +00: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