Comments (1)
Hello,
I don't believe it's a bug. You might consider modifying the code as follows:
if reset_mask is not None:
gk = gk.masked_fill(reset_mask, -20)
and the relative error looks good to me.
Using -0.1 * torch.finfo(gk.dtype).max
might be too large. In chunk or fused chunk mode, the kernel needs to compute the cumulative sum of log probabilities. If this value is extremely large, it could cause problems.
from flash-linear-attention.
Related Issues (20)
- AssertionError('All values in both first input shape ([constexpr[16], constexpr[8]]) and second input shape ([constexpr[8], constexpr[16]]) must be >= 16!') HOT 17
- missing hidden_size in linear attention HOT 1
- IS there any speed(train and inference) and memory benchmarking comparison between GLA and Mamba? HOT 1
- dtype error when implementing modeling_transformer.py HOT 1
- Use Cache with GLA model raised error HOT 6
- Transformer model not learning after adding a classification head HOT 13
- bugs in BasedLinearAttention/LinearAttention/HGRN2Attention Implementation HOT 4
- Current FLA RWKV6 implementation has significant precision issues in pure bf16 mode HOT 2
- training efficiency of GLA HOT 11
- Quick question: Is there a non-causal optimized form of Flash Linear Attention? HOT 7
- benchmark_training_throughput and bugs HOT 5
- Lack of speed advantage in GLA training HOT 4
- Add implementations of Mamba 2 into FLA HOT 7
- High precision and gradient discrepancy in RWKV Triton implementation between chunk and recurrent_fuse HOT 2
- RuntimeError: Triton Error [CUDA]: device-side assert triggered for fla.modules.layernorm.py HOT 5
- Hello from HF Diffusers HOT 3
- bug in treatment of scale for fused_chunk_linear_attn HOT 1
- Variable-length sequence support HOT 2
- Chunk wise linear attn kernel does not work with torch compile (returns incorrects values / NaNs) HOT 10
- Checkpoints for 340M models HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flash-linear-attention.