Commit Graph

1331 Commits

Author SHA1 Message Date
Zoli Somogyi ab8dd0dfc7 Correcting non-standard way of working with PromptExecutionSettings
The extension of PromptExecutionSettings is not only for ChatCompletion, but also for text completion and text embedding.
2024-04-24 08:06:40 +02:00
Zoli Somogyi 156d7bb463 Revert "Standardizing Image Data implementation"
This reverts commit b2423fe6e9.
2024-04-24 07:57:17 +02:00
Zoli Somogyi 6bd269da60 Revert "Simplifying image handling"
This reverts commit f264024666.
2024-04-24 07:57:15 +02:00
Zoli Somogyi 8ea82bcc28 Revert "Embeddings correction"
This reverts commit 3ded2dd74d.
2024-04-24 07:57:12 +02:00
Zoli Somogyi 5a4c0d4637 Revert "Automatic Solution Generator - Work in progress"
This reverts commit b1f3987fae.
2024-04-24 07:57:09 +02:00
Zoli Somogyi 5a196ec6f9 Reapply "Automatic Solution Generator - Work in progress"
This reverts commit ad2c81d957.
2024-04-24 07:56:58 +02:00
Zoli Somogyi ad2c81d957 Revert "Automatic Solution Generator - Work in progress"
This reverts commit 9c91fac20f.
2024-04-24 07:49:28 +02:00
Zoli Somogyi b1f3987fae Automatic Solution Generator - Work in progress 2024-04-24 07:49:28 +02:00
Zoli Somogyi 3ded2dd74d Embeddings correction 2024-04-24 07:49:28 +02:00
Zoli Somogyi f264024666 Simplifying image handling 2024-04-24 07:49:22 +02:00
Zoli Somogyi b2423fe6e9 Standardizing Image Data implementation 2024-04-24 07:49:08 +02:00
Martin Evans ccc49eb1e0
BatchedExecutor Save/Load (#681)
* Added the ability to save and load individual conversations in a batched executor.
 - New example
 - Added `BatchedExecutor.Load(filepath)` method
 - Added `Conversation.Save(filepath)` method
 - Added new (currently internal) `SaveState`/`LoadState` methods in LLamaContext which can stash some extra binary data in the header

* Added ability to save/load a `Conversation` to an in-memory state, instead of to file.

* Moved the new save/load methods out to an extension class specifically for the batched executor.

* Removed unnecessary spaces
2024-04-23 15:46:56 +01:00
Chirag Karia 05937de5dc
Merge branch 'SciSharp:master' into feature/interactive-sk-chatcompletion 2024-04-22 11:20:45 -04:00
Lyrcaxis f01c13ee54
Made special tokens included in prompts tokenize as intended (#677) 2024-04-20 15:23:55 +01:00
jlsantiago ebc7c24ef7
Merge pull request #678 from SignalRT/master
Disable Metal on CI UnitTest
2024-04-19 19:41:28 +02:00
SignalRT b416966ec4 Disable Metal on CI UnitTest 2024-04-19 19:38:58 +02:00
Martin Evans 550f2f7684 Fixed build due to changes in unit tests 2024-04-19 18:31:14 +01:00
jlsantiago 8f358e12e3
Merge pull request #672 from SignalRT/master
Reintroduce MacOS on CI
2024-04-19 19:17:23 +02:00
jlsantiago df9a549e64
Merge branch 'master' into master 2024-04-19 19:17:09 +02:00
Martin Evans 3c76440957 - Added tests for generating embeddings with generative model and embedding model
- Rewritten native API methods for embeddings to return pointers - null is a valid value for these methods to return so `Span` is not appropriate
2024-04-19 16:30:32 +01:00
Zoli Somogyi 89217f73ca
Embeddings correction (#674)
* Embeddings correction
2024-04-19 16:23:44 +01:00
SignalRT 49f437f3ec Typo on comment. Disable Metal on MacOS / OSX 2024-04-19 06:52:58 +02:00
SignalRT 53ae904875 Set GPULayerCount to execute the Test
Set GPULayerCount to default value (20) to execute UnitTest. In the case of Release Execution on MacOS set the value to ZERO to disable METAL on MacOS and be able to execute it in CI.
2024-04-18 22:03:47 +02:00
SignalRT e6b7141188 Change attribute to a Filter to disable test on CI 2024-04-18 21:29:37 +02:00
SignalRT 75cad1f3a5 Remove .NET7 on test 2024-04-18 06:36:09 +02:00
SignalRT 89fbbc0f51 Restore previous dotnet-versions 2024-04-18 06:13:10 +02:00
SignalRT bb5d7e189d Create an Specific Fact attribute to disable some test on CI and execute that test on Debug 2024-04-17 23:03:31 +02:00
SignalRT cbe0c0ef3e Disable metal 2024-04-17 22:37:08 +02:00
SignalRT 74bde89a61 Test to disable metal on test 2024-04-17 22:24:29 +02:00
SignalRT 330e38553e .NET 6 2024-04-17 22:11:52 +02:00
SignalRT 44c393db1e Reintroduce MacOS on test builds
Using the new M1 macos runner:

https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/
2024-04-17 21:44:30 +02:00
Chirag Karia 50e139b0a2
Update LLamaSharpChatCompletion Semantic Kernel inference to send only the most recent user message in SK ChatHistory instance when using StatefulExecutor models 2024-04-17 12:57:55 -04:00
Martin Evans c325ac9127
April 2024 Binary Update (#662)
* Updated binaries, using [this build](https://github.com/SciSharp/LLamaSharp/actions/runs/8654672719/job/23733195669) for llama.cpp commit `f7001ccc5aa359fcf41bba19d1c99c3d25c9bcc7`.

 - Added all new functions.
 - Moved some functions (e.g. `SafeLlamaModelHandle` specific functions) into `SafeLlamaModelHandle.cs`
 - Exposed tokens on `SafeLlamaModelHandle` and `LLamaWeights` through a `Tokens` property. As new special tokens are added in the future they can be added here.
 - Changed all token properties to return nullable tokens, to handle some models not having some tokens.
 - Fixed `DefaultSamplingPipeline` to handle no newline token in some models.

* Moved native methods to more specific locations.

 - Context specific things have been moved into `SafeLLamaContextHandle.cs` and made private - they're exposed through C# properties and methods already.
 - Checking that GPU layer count is zero if GPU offload is not supported.
 - Moved methods for creating default structs (`llama_model_quantize_default_params` and `llama_context_default_params`) into relevant structs.

* Removed exception if `GpuLayerCount > 0` when GPU is not supported.

* - Added low level wrapper methods for new per-sequence state load/save in `SafeLLamaContextHandle`
 - Added high level wrapper methods (save/load with `State` object or memory mapped file) in `LLamaContext`
 - Moved native methods for per-sequence state load/save into `SafeLLamaContextHandle`

* Added update and defrag methods for KV cache in `SafeLLamaContextHandle`

* Updated submodule to `f7001ccc5aa359fcf41bba19d1c99c3d25c9bcc7`

* Passing the sequence ID when saving a single sequence state
2024-04-16 23:19:47 +01:00
jlsantiago 399e81d314
Merge pull request #664 from SignalRT/LLavaResetOnImageChange
Llava Initial approach to clear images
2024-04-16 21:37:06 +02:00
Martin Evans 274ab6e578
Merge pull request #663 from martindevans/remove_example_context_size
Removed `ContextSize` from most examples
2024-04-15 14:24:54 +01:00
Martin Evans 6b816dd51b Removed context size from SpeechChat 2024-04-15 13:49:47 +01:00
Martin Evans 18d784e088
Merge pull request #665 from martindevans/fix_beam_test
Fixed Beam Search Test
2024-04-14 15:52:12 +01:00
Martin Evans 80d9c9b218
Merge pull request #667 from martindevans/disable_macos_ci_2
Removed MacOS CI
2024-04-14 15:52:01 +01:00
Martin Evans 25379df93b Removed it from `build` list too 2024-04-14 15:41:00 +01:00
Martin Evans 7899c73051 Fixed formatting 2024-04-14 15:38:53 +01:00
Martin Evans 6f4958e044
Merge pull request #666 from martindevans/disabled_MacOS_CI
Disable MacOS CI
2024-04-14 15:37:11 +01:00
Martin Evans f21a640904 MacOS CI has been flakey for months, taking 2 or 3 attempts on every PR before it finally passes. Disabled it. 2024-04-14 15:35:58 +01:00
Martin Evans c760cb5f16 - Fixed beam search test to use decode
- Enabled it in CI
2024-04-13 21:36:54 +01:00
SignalRT 0cf6073378 Revert "Try MacOS ARM availability"
This reverts commit f29f61ee0f.
2024-04-13 17:49:54 +02:00
SignalRT f29f61ee0f Try MacOS ARM availability 2024-04-13 17:38:49 +02:00
SignalRT 168f697db6 Clean up and align documentation with the changes in the interface 2024-04-13 16:34:32 +02:00
SignalRT aa11562f62 Link the llama.cpp reference about reset llava contex 2024-04-13 11:59:16 +02:00
SignalRT d6890e4ec4 Initial approach to clear images 2024-04-13 11:33:41 +02:00
Martin Evans 64db478578 Removed `ContextSize` from most examples. If it's not set it's retrieved from the model, which is usually what you want! 2024-04-12 23:57:08 +01:00
jlsantiago 8dd9101f8d
Merge pull request #653 from zsogitbe/master
Extension LLava with in memory images
2024-04-12 22:40:41 +02:00