Skip to content

Commit

Permalink
Bump web-rwkv to v0.8.10
Browse files Browse the repository at this point in the history
  • Loading branch information
cryscan committed May 21, 2024
1 parent 21d0f16 commit e17377d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
12 changes: 6 additions & 6 deletions 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ path = "crates/ai00-core"
# path = "../web-rwkv"
default-features = false
features = ["native"]
version = "0.8.9"
version = "0.8.10"

[profile.release]
lto = false
8 changes: 2 additions & 6 deletions crates/ai00-core/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use web_rwkv::{
infer::{InferChunk, InferInfo, InferInput, InferInputBatch, InferOption, InferOutput},
model::{ModelInfo, ModelRuntime, State},
softmax::softmax,
Job, JobBuilder, JobRuntime, Submission,
Job, JobBuilder, JobRuntime,
},
tensor::{TensorCpu, TensorInit},
tokenizer::Tokenizer,
Expand Down Expand Up @@ -741,12 +741,8 @@ impl Runtime {

// run the model until there is at least one slot finished
let outputs = loop {
let (sender, receiver) = tokio::sync::oneshot::channel();
let input = inference.take().unwrap();
let submission = Submission { input, sender };

let _ = self.runtime.send(submission).await;
let (input, output) = receiver.await?;
let (input, output) = self.runtime.infer(input).await;
inference = Some(input);

if output.iter().any(|batch| batch.size() > 0) {
Expand Down

0 comments on commit e17377d

Please sign in to comment.