8000 models/timestral: add WithForceFloat32 and auto-fallback for backends without Float64 by janpfeifer · Pull Request #76 · gomlx/go-huggingface · GitHub
[go: up one dir, main page]

Skip to content

models/timestral: add WithForceFloat32 and auto-fallback for backends without Float64 - #76

Merged
janpfeifer merged 1 commit into
mainfrom
timestral-updates
Nov 8, 2026
Merged

janpfeifer merged 1 commit into
mainfrom
timestral-updates

Conversation

@janpfeifer
Copy link
Copy Markdown
Contributor

Summary

  • Add Model.WithForceFloat32(forceFloat32 bool) *Model and Model.ForceFloat32() bool in models/timestral to use dtypes.Float32 instead of dtypes.Float64 for internal Welford running statistics (ComputeCausalStatistics and AdvancingBlockFrames).
  • Automatically detect backends that do not support dtypes.Float64 (e.g. Apple Metal / mps), fall back to Float32 statistics, and log a klog.Warningf message suggesting WithForceFloat32(true).
  • Add -force_float32 flag to ./examples/timestral and add TestForceFloat32 unit test.

@janpfeifer
janpfeifer merged commit d1229f2 into main Nov 8, 2026
5 checks passed
@janpfeifer
janpfeifer deleted the timestral-updates branch November 15, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0