Optimize Qwen3.8 inference on Apple silicon
This commit is contained in:
1 parent
bf82df77cb
commit
bd6353804b
14 files changed
+10149
-1145
No files matched your search
@@ -62,7 +62,6 @@ struct QwenTokenizerFile {
|
||||
struct QwenAddedToken {
|
||||
id: usize,
|
||||
content: String,
|
||||
special: bool,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
@@ -225,9 +224,7 @@ impl Tokenizer {
|
||||
));
|
||||
}
|
||||
tokens[token.id] = token.content.as_bytes().to_vec();
|
||||
if token.special {
|
||||
rendered_specials.push((token.content.into_bytes(), token.id as i32));
|
||||
}
|
||||
rendered_specials.push((token.content.into_bytes(), token.id as i32));
|
||||
}
|
||||
if tokens[..=maximum].iter().any(Vec::is_empty) {
|
||||
return Err("Qwen tokenizer token ids are not contiguous".into());
|
||||
|
||||
Reference in new issue
Block a user