Skip to content

Commit e7248fe

Browse files
v0.8.2
1 parent 95d3546 commit e7248fe

File tree

6 files changed

+17
-11
lines changed

6 files changed

+17
-11
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ members = [
88
]
99

1010
[workspace.package]
11-
version = "0.8.1"
11+
version = "0.8.2"
1212
edition = "2021"
1313
authors = ["Olivier Dehaene"]
1414
homepage = "https://github.com/huggingface/text-generation-inference"

docs/openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"name": "Apache 2.0",
1111
"url": "https://www.apache.org/licenses/LICENSE-2.0"
1212
},
13-
"version": "0.8.1"
13+
"version": "0.8.2"
1414
},
1515
"paths": {
1616
"/": {

server/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "text-generation-server"
3-
version = "0.8.1"
3+
version = "0.8.2"
44
description = "Text Generation Inference Python gRPC Server"
55
authors = ["Olivier Dehaene <olivier@huggingface.co>"]
66

server/text_generation_server/models/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ def get_model(
138138
trust_remote_code=trust_remote_code,
139139
)
140140

141-
config_dict, _ = PretrainedConfig.get_config_dict(model_id, revision=revision, trust_remote_code=trust_remote_code)
141+
config_dict, _ = PretrainedConfig.get_config_dict(
142+
model_id, revision=revision, trust_remote_code=trust_remote_code
143+
)
142144
model_type = config_dict["model_type"]
143145

144146
if model_type == "gpt_bigcode":

server/text_generation_server/models/flash_santacoder.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ def load_weights(
8787
):
8888
for filename in filenames:
8989
with safe_open(
90-
filename, framework="pt", device=str(device) if quantize is None else "cpu"
90+
filename,
91+
framework="pt",
92+
device=str(device) if quantize is None else "cpu",
9193
) as f:
9294
for key in f.keys():
9395
value = f.get_tensor(key)
@@ -148,11 +150,13 @@ def load_weights(
148150
module._parameters[param_name][: value.shape[0]] = value
149151
elif "kv_attn.weight" in key:
150152
module._parameters[param_name][
151-
model.transformer.head_size * model.transformer.num_heads :
153+
model.transformer.head_size
154+
* model.transformer.num_heads :
152155
] = value
153156
elif "kv_attn.bias" in key:
154157
module._parameters[param_name][
155-
model.transformer.head_size * model.transformer.num_heads :
158+
model.transformer.head_size
159+
* model.transformer.num_heads :
156160
] = value
157161
else:
158162
if current_parameter_tensor.shape != value.shape:

0 commit comments

Comments
 (0)