Skip to content

Commit 06c58ad

Browse files
committed
added a test for default params.rope_scaling_type
1 parent 8fad055 commit 06c58ad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llama-cpp-2/src/context/params.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ pub struct LlamaContextParams {
7575

7676
/// Default parameters for `LlamaContext`. (as defined in llama.cpp by `llama_context_default_params`)
7777
/// ```
78-
/// # use llama_cpp_2::context::params::LlamaContextParams;
78+
/// # use std::num::NonZeroU32;
79+
/// use llama_cpp_2::context::params::{LlamaContextParams, RopeScalingType};
7980
/// let params = LlamaContextParams::default();
80-
/// assert_eq!(params.n_ctx.unwrap().get(), 512, "n_ctx should be 512");
81+
/// assert_eq!(params.n_ctx, NonZeroU32::new(512), "n_ctx should be 512");
82+
/// assert_eq!(params.rope_scaling_type, RopeScalingType::Unspecified);
8183
/// ```
8284
impl Default for LlamaContextParams {
8385
fn default() -> Self {

0 commit comments

Comments
 (0)