huggingface / huggingface/candle
Applying functions across Tensor dimensions similar to JAX’s `vmap`
- Dominant language
- Rust
- Stars
- 21k
- Forks
- 1.8k
- Avg merge
- 16h 42m
- Merged PRs (30d)
- 25
Description
Is there a way to apply an arbitrary function across a tensor dimension like Jax’s `vmap`? I haven’t found this feature in the documentation and might have looked for the wrong term.
I need to apply an ODE solver to the batch dimension of a tensor of initial conditions to generate a new tensor with integrated values. Currently, I’m integrating over the entire time domain for all initial conditions, but managing adaptive step sizes is challenging since they’re dictated by the stiffest trajectory.
If this functionality isn’t available, what are the best practices to achieve it? Thanks in advance!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by searching Candle’s tensor APIs and documentation for dimension-wise function application, batching, or a vmap equivalent. Then review how the reported ODE-solver workload is represented across initial conditions and determine whether the expected outcome is an existing usage example, documented best practice, or a new feature. Done should include a clearly scoped answer or implementation path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100