diff options
author | Laurent Mazare <laurent.mazare@gmail.com> | 2024-02-28 21:02:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-28 21:02:41 +0100 |
commit | 4fd00b890036ef67391a9cc03f896247d0a75711 (patch) | |
tree | 19121cce4cab5406e9fda202de71a32427c096bd /candle-examples/src | |
parent | 57267cd53612ede04090853680125b17956804f3 (diff) | |
download | candle-4fd00b890036ef67391a9cc03f896247d0a75711.tar.gz candle-4fd00b890036ef67391a9cc03f896247d0a75711.tar.bz2 candle-4fd00b890036ef67391a9cc03f896247d0a75711.zip |
Add the StarCoder2 model. (#1779)
* Add the StarCoder2 model.
* Add the example code and get things to work.
* And also tweak the readme.
Diffstat (limited to 'candle-examples/src')
-rw-r--r-- | candle-examples/src/token_output_stream.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-examples/src/token_output_stream.rs b/candle-examples/src/token_output_stream.rs index 07f33620..1f507c5e 100644 --- a/candle-examples/src/token_output_stream.rs +++ b/candle-examples/src/token_output_stream.rs @@ -40,7 +40,7 @@ impl TokenOutputStream { }; self.tokens.push(token); let text = self.decode(&self.tokens[self.prev_index..])?; - if text.len() > prev_text.len() && text.chars().last().unwrap().is_alphabetic() { + if text.len() > prev_text.len() && text.chars().last().unwrap().is_alphanumeric() { let text = text.split_at(prev_text.len()); self.prev_index = self.current_index; self.current_index = self.tokens.len(); |