Skip to content

Commit a2819fb

Browse files
committed
???
1 parent a77fec6 commit a2819fb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/levanter/models/gpt2.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,9 @@ def init(Vocab: Axis, config: Gpt2Config, *, key) -> "Gpt2Embeddings":
347347

348348
@named_call
349349
def embed(self, input_ids, *, key, pos_ids: NamedArray):
350+
jax.debug.print("input_ids: has_nan={nan}", nan=input_ids.has_nan)
351+
jax.debug.print("token_embeddings.weight: has_nan={nan}", nan=self.token_embeddings.weight.array.has_nan)
352+
350353
input_embeds = self.token_embeddings(input_ids)
351354
input_embeds_norm = jnp.linalg.norm(input_embeds.array)
352355
input_embeds_has_nan = jnp.any(jnp.isnan(input_embeds.array))

0 commit comments

Comments
 (0)