Skip to content

Commit cf6910a

Browse files
committed
add definition hint for model args
Signed-off-by: Connor1996 <[email protected]>
1 parent ff5d7d0 commit cf6910a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/src/week1-05-qwen2-model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Embedding::as_linear OR Linear (lm_head)
129129
output
130130
```
131131

132-
You can access the number of layers, hidden size, and other model parameters from `mlx_model.args`. Note that different
132+
You can access the number of layers, hidden size, and other model parameters from `mlx_model.args` which is defined in [ModelArgs](https://github.com/ml-explore/mlx-lm/blob/f318741784496dc2025dd7a4dea1ae698d21c610/mlx_lm/models/qwen2.py#L14). Note that different
133133
size of the Qwen2 models use different strategies to map the embeddings back to the token space. For the 0.5b model, it
134134
directly uses the `Embedding::as_linear` layer. For the 7b model, it has a separate `lm_head` linear layer. You can
135135
decide which strategy to use based on the `mlx_model.args.tie_word_embeddings` argument. If it is true, then you should

0 commit comments

Comments
 (0)