Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
8e05ad32
Unverified
Commit
8e05ad32
authored
Oct 13, 2023
by
Matteo Raso
Committed by
GitHub
Oct 13, 2023
Browse files
Fixed KeyError for Mistral (#26682)
* Fixed KeyError for Mistral * Removed try block * Removed whitespace
parent
762af3e3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/mistral/convert_mistral_weights_to_hf.py
...nsformers/models/mistral/convert_mistral_weights_to_hf.py
+1
-1
No files found.
src/transformers/models/mistral/convert_mistral_weights_to_hf.py
View file @
8e05ad32
...
@@ -89,7 +89,7 @@ def write_model(model_path, input_base_path, model_size, tokenizer_path=None, sa
...
@@ -89,7 +89,7 @@ def write_model(model_path, input_base_path, model_size, tokenizer_path=None, sa
num_shards
=
NUM_SHARDS
[
model_size
]
num_shards
=
NUM_SHARDS
[
model_size
]
# For some reason this is a string in the params.json
# For some reason this is a string in the params.json
sliding_window
=
int
(
params
[
"
ragged_attention
"
])
sliding_window
=
int
(
params
[
"
sliding_window
"
])
n_layers
=
params
[
"n_layers"
]
n_layers
=
params
[
"n_layers"
]
n_heads
=
params
[
"n_heads"
]
n_heads
=
params
[
"n_heads"
]
n_heads_per_shard
=
n_heads
//
num_shards
n_heads_per_shard
=
n_heads
//
num_shards
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment