Skip to content

Commit 0450478

Browse files
committed
Adding improvements to the Pallas code and a few other minor updates.
1 parent 2a3dde4 commit 0450478

12 files changed

Lines changed: 1893 additions & 608 deletions

colabs/gsm8k_eval.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@
140140
"source": [
141141
"VARIANT = '2b' # @param ['2b', '2b-it'] {type:\"string\"}\n",
142142
"weights_dir = kagglehub.model_download(f'google/recurrentgemma/flax/{VARIANT}')\n",
143-
"\n",
144143
"weights_dir = pathlib.Path(weights_dir)\n",
145144
"ckpt_path = weights_dir / VARIANT\n",
146145
"vocab_path = weights_dir / 'tokenizer.model'"

colabs/sampling_tutorial_jax.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@
255255
"id": "i15odZWiNpBn"
256256
},
257257
"source": [
258-
"You should a description of the solar system.\n"
258+
"You should get a description of the solar system.\n"
259259
]
260260
}
261261
],

recurrentgemma/jax/__init__.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,17 @@
1818
from recurrentgemma.jax import griffin
1919
from recurrentgemma.jax import layers
2020
from recurrentgemma.jax import modules
21-
from recurrentgemma.jax import pallas
2221
from recurrentgemma.jax import sampler
22+
from recurrentgemma.jax import scan
2323
from recurrentgemma.jax import utils
2424

2525

2626
ScanType = common.ScanType
2727
TemporalBlockType = common.TemporalBlockType
2828
Preset = common.Preset
2929
GriffinConfig = common.GriffinConfig
30-
PallasShardingSpec = pallas.PallasShardingSpec
31-
sharded_lru = pallas.sharded_lru
32-
rnn_scan = layers.rnn_scan
30+
ShardingSpec = scan.ShardingSpec
31+
linear_scan = scan.linear_scan
3332
BlockDiagonalLinear = layers.BlockDiagonalLinear
3433
RGLRU = layers.RGLRU
3534
Conv1D = layers.Conv1D
@@ -47,9 +46,8 @@
4746
__all__ = (
4847
"ScanType",
4948
"TemporalBlockType",
50-
"PallasShardingSpec",
51-
"sharded_lru",
52-
"rnn_scan",
49+
"ShardingSpec",
50+
"linear_scan",
5351
"BlockDiagonalLinear",
5452
"RGLRU",
5553
"Conv1D",

0 commit comments

Comments
 (0)