Commit the final Qwen MTP primary before saving state
This commit is contained in:
1 parent
5ecf8ab4f3
commit
a8cad88100
17 files changed
+806
-127
No files matched your search
@@ -0,0 +1,22 @@
|
||||
--- a/src/engine/metal/qwen_mtplx/issue103_analysis.rs
|
||||
+++ b/src/engine/metal/qwen_mtplx/issue103_analysis.rs
|
||||
@@ -407,6 +407,19 @@
|
||||
"{}",
|
||||
serde_json::json!({"case":"mtp_final","exit":if stop_exit {"first_primary_stop"} else {"max_tokens"},"depth":depth,"temperature":temperature,"prompt_ids":ids,"tokens":result.tokens,"key_length":key.len(),"restored_cached_tokens":reused,"trunk_offsets":offsets,"mtp_offset":execution.mtp_offset().unwrap(),"pending":result.pending,"final_state_error":result.final_state_error})
|
||||
);
|
||||
+ if depth == 1 && temperature == 0.6 && !stop_exit {
|
||||
+ let path = std::env::var_os("DS4_ISSUE106_BAD_CHECKPOINT").unwrap();
|
||||
+ let metadata = crate::engine::qwen::QwenMetadata::open(&root, true).unwrap();
|
||||
+ let identity = super::session_checkpoint::Identity {
|
||||
+ model: metadata.checkpoint_identity(), context: 4096,
|
||||
+ vocabulary: metadata.tokenizer.vocab_size() as u32, mtp: true,
|
||||
+ };
|
||||
+ let mut live = super::request::LiveSession {
|
||||
+ current: Some(snapshot), ..Default::default()
|
||||
+ };
|
||||
+ live.save_checkpoint(std::path::Path::new(&path), identity,
|
||||
+ [106; 32], &execution.streams, execution.stream, |_| {}, || false).unwrap();
|
||||
+ }
|
||||
assert_eq!(offsets, vec![3; 12]);
|
||||
assert_eq!(reused, 4);
|
||||
assert!(result.pending.is_none() && result.final_state_error.is_none());
|
||||
Reference in new issue
Block a user