macro_rules! tensor_map {
($name:expr, { $($from:literal => $to:literal),* $(,)? } $(, $fallback:expr)?) => { ... };
}Expand description
Table-driven exact match with a fallback closure for prefix/layer rules.
Example (TimesFM head):
const HEAD: &[(&str, &str)] = &[("a.weight", "b.weight")];
let out = zsfm_gguf::map_with_table("a.weight", HEAD);
assert_eq!(out.as_deref(), Some("b.weight"));