We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea3f517 commit d025ebdCopy full SHA for d025ebd
mistralrs-core/src/utils/mod.rs
@@ -98,13 +98,13 @@ macro_rules! handle_pipeline_forward_error {
98
error!("{} - Model failed with error: {:?}", $stage, &e);
99
for seq in $seq_slice.iter_mut() {
100
// Step 1: Add all choices to groups
101
- let res = match &tokenizer
102
- {
103
- Some(tok) => match tok.decode(&seq.get_toks()[seq.prompt_tokens()..], false) {
+ let start = seq.prompt_tokens().min(seq.get_toks().len());
+ let res = match &tokenizer {
+ Some(tok) => match tok.decode(&seq.get_toks()[start..], false) {
104
Ok(t) => t,
105
- Err(_) => "".to_string()
+ Err(_) => "".to_string(),
106
},
107
- None => "".to_string()
+ None => "".to_string(),
108
};
109
110
if seq.get_mut_group().is_chat {
0 commit comments