FlashRWKV2 0.2.0a2__tar.gz → 0.2.0a3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/FlashRWKV2.egg-info/PKG-INFO +1 -1
  2. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/PKG-INFO +1 -1
  3. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/cmix/__init__.py +3 -2
  4. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/tmix/tokenshift/__init__.py +11 -14
  5. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/pyproject.toml +1 -1
  6. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/FlashRWKV2.egg-info/SOURCES.txt +0 -0
  7. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/FlashRWKV2.egg-info/dependency_links.txt +0 -0
  8. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/FlashRWKV2.egg-info/not-zip-safe +0 -0
  9. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/FlashRWKV2.egg-info/requires.txt +0 -0
  10. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/FlashRWKV2.egg-info/top_level.txt +0 -0
  11. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/LICENSE +0 -0
  12. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/LICENSES/Apache-2.0.txt +0 -0
  13. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/MANIFEST.in +0 -0
  14. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/NOTICE +0 -0
  15. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/README.md +0 -0
  16. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/csrc/bindings.cpp +0 -0
  17. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/csrc/bindings.h +0 -0
  18. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/csrc/registration.cpp +0 -0
  19. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/csrc/sm80/sampling/infer_fp32_forward_varlen.cpp +0 -0
  20. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/csrc/sm80/sampling/infer_fp32_forward_varlen.cu +0 -0
  21. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/csrc/validation/recurrent_metadata.cpp +0 -0
  22. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/csrc/validation/recurrent_metadata.cu +0 -0
  23. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/csrc/validation.cpp +0 -0
  24. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/csrc/validation.h +0 -0
  25. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/__init__.py +0 -0
  26. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/_internal/elementwise.py +0 -0
  27. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/_internal/execution.py +0 -0
  28. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/_internal/linear.py +0 -0
  29. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/_internal/logprob.py +0 -0
  30. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/_internal/state.py +0 -0
  31. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/compile.py +0 -0
  32. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/embedding/__init__.py +0 -0
  33. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/head/ce/__init__.py +0 -0
  34. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/head/ce/tilelang.py +0 -0
  35. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/head/l2wrap_ce/__init__.py +0 -0
  36. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/head/linear/__init__.py +0 -0
  37. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/loss/l2wrap_ce/__init__.py +0 -0
  38. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/loss/l2wrap_ce/tilelang.py +0 -0
  39. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/mtp/__init__.py +0 -0
  40. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/post_norm/__init__.py +0 -0
  41. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/post_norm/tilelang.py +0 -0
  42. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/sampling/__init__.py +0 -0
  43. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/tmix/kk_pre/tilelang.py +0 -0
  44. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/tmix/readout/__init__.py +0 -0
  45. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/tmix/readout/pretrain.py +0 -0
  46. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/tmix/readout/tilelang.py +0 -0
  47. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/tmix/tokenshift/tilelang.py +0 -0
  48. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/tmix/vres_gate/tilelang.py +0 -0
  49. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/tmix/wkv7/__init__.py +0 -0
  50. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/tmix/wkv7/pretrain.py +0 -0
  51. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/tmix/wkv7/tilelang.py +0 -0
  52. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/tmix/wkv_prepare/__init__.py +0 -0
  53. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/flashrwkv2/tmix/wkv_prepare/tilelang.py +0 -0
  54. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/setup.cfg +0 -0
  55. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/setup.py +0 -0
  56. {flashrwkv2-0.2.0a2 → flashrwkv2-0.2.0a3}/tests/test_runtime.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: FlashRWKV2
3
- Version: 0.2.0a2
3
+ Version: 0.2.0a3
4
4
  Summary: TileLang RWKV-7 operators with shared BF16 training and inference
5
5
  License-Expression: MIT
6
6
  Project-URL: Repository, https://github.com/rwkv-rs/FlashRWKV2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: FlashRWKV2
3
- Version: 0.2.0a2
3
+ Version: 0.2.0a3
4
4
  Summary: TileLang RWKV-7 operators with shared BF16 training and inference
5
5
  License-Expression: MIT
6
6
  Project-URL: Repository, https://github.com/rwkv-rs/FlashRWKV2
@@ -64,6 +64,7 @@ def infer_cmix_forward_varlen(
64
64
 
65
65
  The inference value weight retains its runtime [F,C] layout. A transpose
66
66
  view feeds the same projection as the training [C,F] weight.
67
+ Projection weights and adapters must use storage separate from ``shift_state_pool``.
67
68
  ``save_normalized`` optionally receives the BF16 shift state of each
68
69
  active input row.
69
70
  """
@@ -77,12 +78,12 @@ def infer_cmix_forward_varlen(
77
78
  (value_lora_a, value_lora_b, value_lora_scale, value_use_nora),
78
79
  ),
79
80
  )
80
- return _postnorm_tokenshift_varlen(
81
+ residual, (mixed,) = _postnorm_tokenshift_varlen(
81
82
  x, res, weight, bias, (x_k,), shift_state_pool, cu_seqlens, state_indices,
82
83
  max_seqlen, eps, validated_metadata, save_normalized=save_normalized,
83
84
  save_inputs=(key_weight, value_weight, key_lora_a, key_lora_b, value_lora_a, value_lora_b),
84
- project=lambda mixed: _project(mixed[0], key_weight, value_weight, adapters),
85
85
  )
86
+ return residual, _project(mixed, key_weight, value_weight, adapters)
86
87
 
87
88
 
88
89
  def pretrain_cmix_bf16(
@@ -47,7 +47,7 @@ def infer_tmix_postnorm_tokenshift_forward_varlen(
47
47
 
48
48
  def _postnorm_tokenshift_varlen(
49
49
  x, res, weight, bias, mixes, shift_state_pool, cu_seqlens, state_indices,
50
- max_seqlen, eps, validated_metadata, *, save_normalized=None, save_inputs=(), project=None,
50
+ max_seqlen, eps, validated_metadata, *, save_normalized=None, save_inputs=(),
51
51
  ):
52
52
  from ..._internal.state import gather_state, scatter_state
53
53
  from ...post_norm.tilelang import norm
@@ -74,22 +74,19 @@ def _postnorm_tokenshift_varlen(
74
74
  )
75
75
  cu = ticket._query_start_loc_snapshot()
76
76
  indices, status = ticket._state_indices_snapshot(), ticket._status()
77
- fused = ticket._max_seqlen() == 1 and x.shape[0] == indices.numel()
78
- if fused:
79
- total, mixed = fused_post_norm_tokenshift(
77
+ if ticket._max_seqlen() == 1 and x.shape[0] == indices.numel():
78
+ return fused_post_norm_tokenshift(
80
79
  x, res, weight, bias, mixes, shift_state_pool, indices, status, eps,
81
80
  save_normalized=save_normalized,
82
81
  )
83
- else:
84
- normalized, total = norm(x, weight, bias, eps, res, return_res=True)
85
- initial = gather_state(shift_state_pool, indices, status)
86
- mixed, final = tokenshift(
87
- normalized, mixes, cu, initial, _status=status, _save_normalized=save_normalized,
88
- )
89
- output = mixed if project is None else project(mixed)
90
- if not fused:
91
- scatter_state(shift_state_pool, final, indices, status)
92
- return total, output
82
+
83
+ normalized, total = norm(x, weight, bias, eps, res, return_res=True)
84
+ initial = gather_state(shift_state_pool, indices, status)
85
+ mixed, final = tokenshift(
86
+ normalized, mixes, cu, initial, _status=status, _save_normalized=save_normalized,
87
+ )
88
+ scatter_state(shift_state_pool, final, indices, status)
89
+ return total, mixed
93
90
 
94
91
 
95
92
  def pretrain_tmix_tokenshift_bf16(
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
7
7
 
8
8
  [project]
9
9
  name = "FlashRWKV2"
10
- version = "0.2.0a2"
10
+ version = "0.2.0a3"
11
11
  description = "TileLang RWKV-7 operators with shared BF16 training and inference"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.10"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes