vocab_parallel_jax ¶
log_prob_of from softmax_jax.py for logits sharded over the class dimension along a
named mesh axis (call it inside jax.shard_map).
vocab_parallel_log_prob_of ¶
log_prob_of for logits split over the last (class) dimension along mesh axis
axis_name. Call it inside jax.shard_map; it communicates with psum / pmax.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
logits_shard
|
Array
|
|
required |
target
|
Array
|
|
required |
axis_name
|
str
|
Name of the mesh axis the classes are split along. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
|