Browse Source

Revert LLamasSharp project changes

tags/v0.6.0
sa_ddam213 2 years ago
parent
commit
4ec9aed47a
Failed to extract signature
5 changed files with 6 additions and 9 deletions
  1. +1
    -2
      LLama/LLamaExecutorBase.cs
  2. +1
    -1
      LLama/LLamaInstructExecutor.cs
  3. +1
    -1
      LLama/LLamaInteractExecutor.cs
  4. +1
    -2
      LLama/LLamaStatelessExecutor.cs
  5. +2
    -3
      LLama/LLamaWeights.cs

+ 1
- 2
LLama/LLamaExecutorBase.cs View File

@@ -75,10 +75,9 @@ namespace LLama
/// </summary>
/// <param name="context"></param>
/// <param name="logger"></param>
protected StatefulExecutorBase(LLamaContext context, ILogger? logger = null)
protected StatefulExecutorBase(LLamaContext context)
{
Context = context;
_logger = logger;
_pastTokensCount = 0;
_consumedTokensCount = 0;
_n_session_consumed = 0;


+ 1
- 1
LLama/LLamaInstructExecutor.cs View File

@@ -32,7 +32,7 @@ namespace LLama
/// <param name="instructionPrefix"></param>
/// <param name="instructionSuffix"></param>
public InstructExecutor(LLamaContext context, ILogger logger = null!, string instructionPrefix = "\n\n### Instruction:\n\n",
string instructionSuffix = "\n\n### Response:\n\n") : base(context, logger)
string instructionSuffix = "\n\n### Response:\n\n") : base(context)
{
_inp_pfx = Context.Tokenize(instructionPrefix, true);
_inp_sfx = Context.Tokenize(instructionSuffix, false);


+ 1
- 1
LLama/LLamaInteractExecutor.cs View File

@@ -27,7 +27,7 @@ namespace LLama
/// </summary>
/// <param name="context"></param>
/// <param name="logger"></param>
public InteractiveExecutor(LLamaContext context, ILogger logger = null!) : base(context, logger)
public InteractiveExecutor(LLamaContext context) : base(context)
{
_llama_token_newline = NativeApi.llama_token_nl(Context.NativeHandle);
}


+ 1
- 2
LLama/LLamaStatelessExecutor.cs View File

@@ -36,9 +36,8 @@ namespace LLama
/// <param name="weights"></param>
/// <param name="params"></param>
/// <param name="logger"></param>
public StatelessExecutor(LLamaWeights weights, IContextParams @params, ILogger logger = null!)
public StatelessExecutor(LLamaWeights weights, IContextParams @params)
{
_logger = logger;
_weights = weights;
_params = @params;



+ 2
- 3
LLama/LLamaWeights.cs View File

@@ -81,11 +81,10 @@ namespace LLama
/// Create a llama_context using this model
/// </summary>
/// <param name="params"></param>
/// <param name="logger"></param>
/// <returns></returns>
public LLamaContext CreateContext(IContextParams @params, ILogger logger = default!)
public LLamaContext CreateContext(IContextParams @params)
{
return new LLamaContext(this, @params, logger);
return new LLamaContext(this, @params);
}
}
}

Loading…
Cancel
Save