We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71a8e22 commit 914bce3Copy full SHA for 914bce3
llama-cpp-2/src/sampling.rs
@@ -71,6 +71,17 @@ impl LlamaSampler {
71
}
72
73
74
+ /// Gets the random seed used by this sampler.
75
+ ///
76
+ /// Returns:
77
+ /// - For random samplers (dist, mirostat, mirostat_v2): returns their current seed
78
+ /// - For sampler chains: returns the first non-default seed found in reverse order
79
+ /// - For all other samplers: returns 0xFFFFFFFF
80
+ #[must_use]
81
+ pub fn get_seed(&self) -> u32 {
82
+ unsafe { llama_cpp_sys_2::llama_sampler_get_seed(self.sampler) }
83
+ }
84
+
85
/// Combines a list of samplers into a single sampler that applies each component sampler one
86
/// after another.
87
///
0 commit comments