Add settings to gitignore - #16
Merged
Merged
Conversation
Performance Comparison
|
gramalingam
added a commit
that referenced
this pull request
Mar 23, 2026
Add troubleshooting entry #16 to adding-a-new-model skill covering the hardcoded Cast(to=float32) pitfall that breaks bfloat16/float16 models. Add design principle #7 (dtype-agnostic components) and a CastLike op pattern section to the reusable-components skill, explaining when to use CastLike vs Cast. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: G Ramalingam <grama@microsoft.com>
gramalingam
added a commit
that referenced
this pull request
Mar 23, 2026
Match HuggingFace's precision behaviour for numerically sensitive ops: - SelectiveScan: upcast dt (softplus), A_log (exp), B, C, x, and state update to float32; cast output and new_ssm_state back to input dtype. - Mamba2Scan: same fp32 upcast for the multi-head SSM recurrence. - GatedRMSNorm: upcast both hidden_states and gate to float32 for SiLU gating and variance computation, matching Zamba2RMSNormGated. - PostGatedRMSNorm: use stash_type=1 for RMSNorm, fp32 for SiLU gate. - GatedDeltaNet: upcast softplus/exp decay computation to float32. - _RMSNorm (SSM internal): upcast variance computation to float32. Update skills documentation: - reusable-components: replace CastLike-only guidance with complete fp32 upcast pattern (upcast → compute → cast back), table of which ops need fp32, and when upcast is NOT needed. - adding-a-new-model: rewrite troubleshooting #16 to cover both type mismatch and numerical drift, with the correct two-part pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: G Ramalingam <grama@microsoft.com>
gramalingam
added a commit
that referenced
this pull request
Mar 23, 2026
Add troubleshooting entry #16 to adding-a-new-model skill covering the hardcoded Cast(to=float32) pitfall that breaks bfloat16/float16 models. Add design principle #7 (dtype-agnostic components) and a CastLike op pattern section to the reusable-components skill, explaining when to use CastLike vs Cast. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: G Ramalingam <grama@microsoft.com>
gramalingam
added a commit
that referenced
this pull request
Mar 23, 2026
Match HuggingFace's precision behaviour for numerically sensitive ops: - SelectiveScan: upcast dt (softplus), A_log (exp), B, C, x, and state update to float32; cast output and new_ssm_state back to input dtype. - Mamba2Scan: same fp32 upcast for the multi-head SSM recurrence. - GatedRMSNorm: upcast both hidden_states and gate to float32 for SiLU gating and variance computation, matching Zamba2RMSNormGated. - PostGatedRMSNorm: use stash_type=1 for RMSNorm, fp32 for SiLU gate. - GatedDeltaNet: upcast softplus/exp decay computation to float32. - _RMSNorm (SSM internal): upcast variance computation to float32. Update skills documentation: - reusable-components: replace CastLike-only guidance with complete fp32 upcast pattern (upcast → compute → cast back), table of which ops need fp32, and when upcast is NOT needed. - adding-a-new-model: rewrite troubleshooting #16 to cover both type mismatch and numerical drift, with the correct two-part pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: G Ramalingam <grama@microsoft.com>
gramalingam
added a commit
that referenced
this pull request
Mar 24, 2026
Add troubleshooting entry #16 to adding-a-new-model skill covering the hardcoded Cast(to=float32) pitfall that breaks bfloat16/float16 models. Add design principle #7 (dtype-agnostic components) and a CastLike op pattern section to the reusable-components skill, explaining when to use CastLike vs Cast. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: G Ramalingam <grama@microsoft.com>
gramalingam
added a commit
that referenced
this pull request
Mar 24, 2026
Match HuggingFace's precision behaviour for numerically sensitive ops: - SelectiveScan: upcast dt (softplus), A_log (exp), B, C, x, and state update to float32; cast output and new_ssm_state back to input dtype. - Mamba2Scan: same fp32 upcast for the multi-head SSM recurrence. - GatedRMSNorm: upcast both hidden_states and gate to float32 for SiLU gating and variance computation, matching Zamba2RMSNormGated. - PostGatedRMSNorm: use stash_type=1 for RMSNorm, fp32 for SiLU gate. - GatedDeltaNet: upcast softplus/exp decay computation to float32. - _RMSNorm (SSM internal): upcast variance computation to float32. Update skills documentation: - reusable-components: replace CastLike-only guidance with complete fp32 upcast pattern (upcast → compute → cast back), table of which ops need fp32, and when upcast is NOT needed. - adding-a-new-model: rewrite troubleshooting #16 to cover both type mismatch and numerical drift, with the correct two-part pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: G Ramalingam <grama@microsoft.com>
gramalingam
added a commit
that referenced
this pull request
Mar 27, 2026
Add troubleshooting entry #16 to adding-a-new-model skill covering the hardcoded Cast(to=float32) pitfall that breaks bfloat16/float16 models. Add design principle #7 (dtype-agnostic components) and a CastLike op pattern section to the reusable-components skill, explaining when to use CastLike vs Cast. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: G Ramalingam <grama@microsoft.com>
gramalingam
added a commit
that referenced
this pull request
Mar 27, 2026
Match HuggingFace's precision behaviour for numerically sensitive ops: - SelectiveScan: upcast dt (softplus), A_log (exp), B, C, x, and state update to float32; cast output and new_ssm_state back to input dtype. - Mamba2Scan: same fp32 upcast for the multi-head SSM recurrence. - GatedRMSNorm: upcast both hidden_states and gate to float32 for SiLU gating and variance computation, matching Zamba2RMSNormGated. - PostGatedRMSNorm: use stash_type=1 for RMSNorm, fp32 for SiLU gate. - GatedDeltaNet: upcast softplus/exp decay computation to float32. - _RMSNorm (SSM internal): upcast variance computation to float32. Update skills documentation: - reusable-components: replace CastLike-only guidance with complete fp32 upcast pattern (upcast → compute → cast back), table of which ops need fp32, and when upcast is NOT needed. - adding-a-new-model: rewrite troubleshooting #16 to cover both type mismatch and numerical drift, with the correct two-part pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: G Ramalingam <grama@microsoft.com>
gramalingam
added a commit
that referenced
this pull request
Mar 27, 2026
Add troubleshooting entry #16 to adding-a-new-model skill covering the hardcoded Cast(to=float32) pitfall that breaks bfloat16/float16 models. Add design principle #7 (dtype-agnostic components) and a CastLike op pattern section to the reusable-components skill, explaining when to use CastLike vs Cast. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: G Ramalingam <grama@microsoft.com>
gramalingam
added a commit
that referenced
this pull request
Mar 27, 2026
Match HuggingFace's precision behaviour for numerically sensitive ops: - SelectiveScan: upcast dt (softplus), A_log (exp), B, C, x, and state update to float32; cast output and new_ssm_state back to input dtype. - Mamba2Scan: same fp32 upcast for the multi-head SSM recurrence. - GatedRMSNorm: upcast both hidden_states and gate to float32 for SiLU gating and variance computation, matching Zamba2RMSNormGated. - PostGatedRMSNorm: use stash_type=1 for RMSNorm, fp32 for SiLU gate. - GatedDeltaNet: upcast softplus/exp decay computation to float32. - _RMSNorm (SSM internal): upcast variance computation to float32. Update skills documentation: - reusable-components: replace CastLike-only guidance with complete fp32 upcast pattern (upcast → compute → cast back), table of which ops need fp32, and when upcast is NOT needed. - adding-a-new-model: rewrite troubleshooting #16 to cover both type mismatch and numerical drift, with the correct two-part pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: G Ramalingam <grama@microsoft.com>
gramalingam
added a commit
that referenced
this pull request
Mar 30, 2026
Add troubleshooting entry #16 to adding-a-new-model skill covering the hardcoded Cast(to=float32) pitfall that breaks bfloat16/float16 models. Add design principle #7 (dtype-agnostic components) and a CastLike op pattern section to the reusable-components skill, explaining when to use CastLike vs Cast. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: G Ramalingam <grama@microsoft.com>
gramalingam
added a commit
that referenced
this pull request
Mar 30, 2026
Match HuggingFace's precision behaviour for numerically sensitive ops: - SelectiveScan: upcast dt (softplus), A_log (exp), B, C, x, and state update to float32; cast output and new_ssm_state back to input dtype. - Mamba2Scan: same fp32 upcast for the multi-head SSM recurrence. - GatedRMSNorm: upcast both hidden_states and gate to float32 for SiLU gating and variance computation, matching Zamba2RMSNormGated. - PostGatedRMSNorm: use stash_type=1 for RMSNorm, fp32 for SiLU gate. - GatedDeltaNet: upcast softplus/exp decay computation to float32. - _RMSNorm (SSM internal): upcast variance computation to float32. Update skills documentation: - reusable-components: replace CastLike-only guidance with complete fp32 upcast pattern (upcast → compute → cast back), table of which ops need fp32, and when upcast is NOT needed. - adding-a-new-model: rewrite troubleshooting #16 to cover both type mismatch and numerical drift, with the correct two-part pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: G Ramalingam <grama@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.