Merge pull request #368 from martindevans/context_set_seed
Context Set Seed
This commit is contained in:
commit
c298ab828a
|
@ -86,6 +86,15 @@ namespace LLama
|
|||
NativeHandle = SafeLLamaContextHandle.Create(model.NativeHandle, lparams);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the seed for the RNG
|
||||
/// </summary>
|
||||
/// <param name="seed"></param>
|
||||
public void SetSeed(uint seed)
|
||||
{
|
||||
NativeHandle.SetSeed(seed);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tokenize a string.
|
||||
/// </summary>
|
||||
|
|
|
@ -283,5 +283,14 @@ namespace LLama.Native
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Set the RNG seed
|
||||
/// </summary>
|
||||
/// <param name="seed"></param>
|
||||
public void SetSeed(uint seed)
|
||||
{
|
||||
NativeApi.llama_set_rng_seed(this, seed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue