Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set n_ctx to max context lenght supported by model #35

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nobodywho/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nobodywho/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nobodywho"
version = "2.0.2"
version = "2.0.3"
edition = "2021"

[lib]
Expand Down
1 change: 1 addition & 0 deletions nobodywho/src/llm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ pub fn run_worker(
let n_threads = std::thread::available_parallelism().unwrap().get() as i32;
let ctx_params = LlamaContextParams::default()
.with_seed(seed)
.with_n_ctx(std::num::NonZero::new(model.n_ctx_train()))
.with_n_threads(n_threads)
.with_n_threads_batch(n_threads);

Expand Down
Loading