Skip to content

Commit

Permalink
Merge pull request #131 from edgenai/chore/bump-llama
Browse files Browse the repository at this point in the history
bumped llama crate version
  • Loading branch information
pedro-devv authored Mar 26, 2024
2 parents e9a3cc0 + 40ddf12 commit 86ff3b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

16 changes: 12 additions & 4 deletions crates/edgen_rt_llama_cpp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ impl UnloadingModel {
.map_err(move |e| LLMEndpointError::Advance(e.to_string()))?;

let sampler = StandardSampler::default();
let handle = session.start_completing_with(sampler, SINGLE_MESSAGE_LIMIT);
let handle = session
.start_completing_with(sampler, SINGLE_MESSAGE_LIMIT)
.map_err(|e| LLMEndpointError::Advance(e.to_string()))?;

Ok(handle.into_string_async().await)
} else {
Expand All @@ -276,7 +278,9 @@ impl UnloadingModel {
id.advance(new_context);

let sampler = StandardSampler::default();
let handle = session_guard.start_completing_with(sampler, SINGLE_MESSAGE_LIMIT);
let handle = session_guard
.start_completing_with(sampler, SINGLE_MESSAGE_LIMIT)
.map_err(|e| LLMEndpointError::Advance(e.to_string()))?;

(session_signal, handle)
};
Expand Down Expand Up @@ -581,7 +585,9 @@ impl CompletionStream {

(
session_signal,
session_guard.start_completing_with(sampler, SINGLE_MESSAGE_LIMIT),
session_guard
.start_completing_with(sampler, SINGLE_MESSAGE_LIMIT)
.map_err(|e| LLMEndpointError::Advance(e.to_string()))?,
)
};

Expand All @@ -605,7 +611,9 @@ impl CompletionStream {
.advance_context_async(new_context)
.await
.map_err(move |e| LLMEndpointError::Advance(e.to_string()))?;
let handle = session.start_completing_with(sampler, SINGLE_MESSAGE_LIMIT);
let handle = session
.start_completing_with(sampler, SINGLE_MESSAGE_LIMIT)
.map_err(|e| LLMEndpointError::Advance(e.to_string()))?;

Ok(Self {
handle: handle.into_strings(),
Expand Down

0 comments on commit 86ff3b8

Please sign in to comment.