Browse Source

Fixed some final mentions of "mirostate" instead of "mirostat"

tags/v0.5.1
Martin Evans 2 years ago
parent
commit
b5de3ee5aa
3 changed files with 10 additions and 10 deletions
  1. +4
    -4
      LLama/LLamaExecutorBase.cs
  2. +3
    -3
      LLama/LLamaInstructExecutor.cs
  3. +3
    -3
      LLama/LLamaInteractExecutor.cs

+ 4
- 4
LLama/LLamaExecutorBase.cs View File

@@ -68,9 +68,9 @@ namespace LLama
public LLamaModel Model => _model;

/// <summary>
/// Current "mu" value for mirostate sampling
/// Current "mu" value for mirostat sampling
/// </summary>
protected float? MirostateMu { get; set; }
protected float? MirostatMu { get; set; }

/// <summary>
///
@@ -391,8 +391,8 @@ namespace LLama
[JsonPropertyName("last_tokens_maximum_count")]
public int LastTokensCapacity { get; set; }

[JsonPropertyName("mirostate_mu")]
public float? MirostateMu { get; set; }
[JsonPropertyName("mirostat_mu")]
public float? MirostatMu { get; set; }
}
}
}

+ 3
- 3
LLama/LLamaInstructExecutor.cs View File

@@ -53,7 +53,7 @@ namespace LLama
SessionFilePath = _pathSession,
SessionTokens = _session_tokens,
LastTokensCapacity = _last_n_tokens.Capacity,
MirostateMu = MirostateMu
MirostatMu = MirostatMu
};
return state;
}
@@ -216,12 +216,12 @@ namespace LLama
var tokenDataArray = _model.ApplyPenalty(_last_n_tokens, inferenceParams.LogitBias, repeat_last_n,
inferenceParams.RepeatPenalty, inferenceParams.FrequencyPenalty, inferenceParams.PresencePenalty, inferenceParams.PenalizeNL);

var mu = MirostateMu;
var mu = MirostatMu;
var id = _model.Sample(
tokenDataArray, ref mu, inferenceParams.Temperature, inferenceParams.Mirostat, inferenceParams.MirostatTau,
inferenceParams.MirostatEta, inferenceParams.TopK, inferenceParams.TopP, inferenceParams.TfsZ, inferenceParams.TypicalP
);
MirostateMu = mu;
MirostatMu = mu;

_last_n_tokens.Enqueue(id);



+ 3
- 3
LLama/LLamaInteractExecutor.cs View File

@@ -45,7 +45,7 @@ namespace LLama
SessionFilePath = _pathSession,
SessionTokens = _session_tokens,
LastTokensCapacity = _last_n_tokens.Capacity,
MirostateMu = MirostateMu
MirostatMu = MirostatMu
};
return state;
}
@@ -203,12 +203,12 @@ namespace LLama
var tokenDataArray = _model.ApplyPenalty(_last_n_tokens, inferenceParams.LogitBias, repeat_last_n,
inferenceParams.RepeatPenalty, inferenceParams.FrequencyPenalty, inferenceParams.PresencePenalty, inferenceParams.PenalizeNL);

var mu = MirostateMu;
var mu = MirostatMu;
var id = _model.Sample(
tokenDataArray, ref mu, inferenceParams.Temperature, inferenceParams.Mirostat, inferenceParams.MirostatTau,
inferenceParams.MirostatEta, inferenceParams.TopK, inferenceParams.TopP, inferenceParams.TfsZ, inferenceParams.TypicalP
);
MirostateMu = mu;
MirostatMu = mu;

_last_n_tokens.Enqueue(id);



Loading…
Cancel
Save