Browse Source

Merge pull request #663 from martindevans/remove_example_context_size

Removed `ContextSize` from most examples
pull/677/head
Martin Evans GitHub 2 years ago
parent
commit
274ab6e578
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
13 changed files with 2 additions and 13 deletions
  1. +0
    -1
      LLama.Examples/Examples/ChatChineseGB2312.cs
  2. +0
    -1
      LLama.Examples/Examples/ChatSessionStripRoleName.cs
  3. +0
    -1
      LLama.Examples/Examples/ChatSessionWithHistory.cs
  4. +0
    -1
      LLama.Examples/Examples/ChatSessionWithRestart.cs
  5. +0
    -1
      LLama.Examples/Examples/ChatSessionWithRoleName.cs
  6. +0
    -1
      LLama.Examples/Examples/GrammarJsonResponse.cs
  7. +0
    -1
      LLama.Examples/Examples/InstructModeExecute.cs
  8. +0
    -1
      LLama.Examples/Examples/InteractiveModeExecute.cs
  9. +0
    -1
      LLama.Examples/Examples/LoadAndSaveSession.cs
  10. +0
    -1
      LLama.Examples/Examples/LoadAndSaveState.cs
  11. +1
    -1
      LLama.Examples/Examples/SpeechChat.cs
  12. +0
    -1
      LLama.Examples/Examples/StatelessModeExecute.cs
  13. +1
    -1
      LLama.Examples/Examples/TalkToYourself.cs

+ 0
- 1
LLama.Examples/Examples/ChatChineseGB2312.cs View File

@@ -27,7 +27,6 @@ public class ChatChineseGB2312

var parameters = new ModelParams(modelPath)
{
ContextSize = 1024,
Seed = 1337,
GpuLayerCount = 5,
Encoding = Encoding.UTF8


+ 0
- 1
LLama.Examples/Examples/ChatSessionStripRoleName.cs View File

@@ -12,7 +12,6 @@ public class ChatSessionStripRoleName

var parameters = new ModelParams(modelPath)
{
ContextSize = 1024,
Seed = 1337,
GpuLayerCount = 5
};


+ 0
- 1
LLama.Examples/Examples/ChatSessionWithHistory.cs View File

@@ -10,7 +10,6 @@ public class ChatSessionWithHistory

var parameters = new ModelParams(modelPath)
{
ContextSize = 1024,
Seed = 1337,
GpuLayerCount = 5
};


+ 0
- 1
LLama.Examples/Examples/ChatSessionWithRestart.cs View File

@@ -10,7 +10,6 @@ public class ChatSessionWithRestart

var parameters = new ModelParams(modelPath)
{
ContextSize = 1024,
Seed = 1337,
GpuLayerCount = 5
};


+ 0
- 1
LLama.Examples/Examples/ChatSessionWithRoleName.cs View File

@@ -10,7 +10,6 @@ public class ChatSessionWithRoleName

var parameters = new ModelParams(modelPath)
{
ContextSize = 1024,
Seed = 1337,
GpuLayerCount = 5
};


+ 0
- 1
LLama.Examples/Examples/GrammarJsonResponse.cs View File

@@ -14,7 +14,6 @@ namespace LLama.Examples.Examples

var parameters = new ModelParams(modelPath)
{
ContextSize = 1024,
Seed = 1337,
GpuLayerCount = 5
};


+ 0
- 1
LLama.Examples/Examples/InstructModeExecute.cs View File

@@ -13,7 +13,6 @@ namespace LLama.Examples.Examples

var parameters = new ModelParams(modelPath)
{
ContextSize = 1024,
Seed = 1337,
GpuLayerCount = 5
};


+ 0
- 1
LLama.Examples/Examples/InteractiveModeExecute.cs View File

@@ -13,7 +13,6 @@ namespace LLama.Examples.Examples

var parameters = new ModelParams(modelPath)
{
ContextSize = 1024,
Seed = 1337,
GpuLayerCount = 5
};


+ 0
- 1
LLama.Examples/Examples/LoadAndSaveSession.cs View File

@@ -12,7 +12,6 @@ namespace LLama.Examples.Examples

var parameters = new ModelParams(modelPath)
{
ContextSize = 1024,
Seed = 1337,
GpuLayerCount = 5
};


+ 0
- 1
LLama.Examples/Examples/LoadAndSaveState.cs View File

@@ -13,7 +13,6 @@ namespace LLama.Examples.Examples

var parameters = new ModelParams(modelPath)
{
ContextSize = 1024,
Seed = 1337,
GpuLayerCount = 5
};


+ 1
- 1
LLama.Examples/Examples/SpeechChat.cs View File

@@ -50,7 +50,7 @@ NOTE: You may need to poke around with the voice detection threshold, based on y

public LlamaSession_SpeechListener(SpeechRecognitionServer server)
{
var parameters = new ModelParams(UserSettings.GetModelPath()) { ContextSize = 1024, Seed = 1337, GpuLayerCount = 99 };
var parameters = new ModelParams(UserSettings.GetModelPath()) { Seed = 1337, GpuLayerCount = 99 };
model = LLamaWeights.LoadFromFile(parameters);
context = model.CreateContext(parameters);
executor = new InteractiveExecutor(context);


+ 0
- 1
LLama.Examples/Examples/StatelessModeExecute.cs View File

@@ -11,7 +11,6 @@ namespace LLama.Examples.Examples

var parameters = new ModelParams(modelPath)
{
ContextSize = 1024,
Seed = 1337,
GpuLayerCount = 5
};


+ 1
- 1
LLama.Examples/Examples/TalkToYourself.cs View File

@@ -21,7 +21,7 @@ namespace LLama.Examples.Examples
var bob = new InteractiveExecutor(bobCtx);

// Initial alice prompt
var alicePrompt = "Transcript of a dialog, where the Alice interacts a person named Bob. Alice is friendly, kind, honest and good at writing.\nAlice: Hello";
var alicePrompt = "Transcript of a dialog, where the Alice interacts with a person named Bob. Alice is friendly, kind, honest and good at writing.\nAlice: Hello";
var aliceResponse = await Prompt(alice, ConsoleColor.Green, alicePrompt, false, false);

// Initial bob prompt


Loading…
Cancel
Save