Skip to content

Commit

Permalink
Merge pull request #31 from garfbargle/main
Browse files Browse the repository at this point in the history
deal with llama.cpp api change
  • Loading branch information
eastriverlee authored Aug 18, 2024
2 parents 0441acc + 60bb5ec commit 4689414
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/LLM/LLM.swift
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,10 @@ extension Model {

public func shouldAddBOS() -> Bool {
let addBOS = llama_add_bos_token(self);
guard addBOS != -1 else {
guard !addBOS else {
return llama_vocab_type(self) == LLAMA_VOCAB_TYPE_SPM
}
return addBOS != 0
return addBOS
}

public func decodeOnly(_ token: Token) -> String {
Expand Down

0 comments on commit 4689414

Please sign in to comment.