Upload folder using huggingface_hub
Browse files- README.md +22 -3
- generation_config.json +5 -2
- tokenizer.json +64 -4
- tokenizer_config.json +1 -1
README.md
CHANGED
|
@@ -185,6 +185,25 @@ extra_gated_fields:
|
|
| 185 |
By clicking Submit below I accept the terms of the license and acknowledge that the information I provide will be collected stored processed and shared in accordance with the Meta Privacy Policy: checkbox
|
| 186 |
extra_gated_description: The information you provide will be collected, stored, processed and shared in accordance with the [Meta Privacy Policy](https://www.facebook.com/privacy/policy/).
|
| 187 |
extra_gated_button_content: Submit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
---
|
| 189 |
|
| 190 |
## Model Details
|
|
@@ -285,7 +304,7 @@ pipeline = transformers.pipeline(
|
|
| 285 |
"text-generation",
|
| 286 |
model=model_id,
|
| 287 |
model_kwargs={"torch_dtype": torch.bfloat16},
|
| 288 |
-
device="
|
| 289 |
)
|
| 290 |
|
| 291 |
messages = [
|
|
@@ -300,8 +319,8 @@ prompt = pipeline.tokenizer.apply_chat_template(
|
|
| 300 |
)
|
| 301 |
|
| 302 |
terminators = [
|
| 303 |
-
tokenizer.eos_token_id,
|
| 304 |
-
tokenizer.convert_tokens_to_ids("<|eot_id|>")
|
| 305 |
]
|
| 306 |
|
| 307 |
outputs = pipeline(
|
|
|
|
| 185 |
By clicking Submit below I accept the terms of the license and acknowledge that the information I provide will be collected stored processed and shared in accordance with the Meta Privacy Policy: checkbox
|
| 186 |
extra_gated_description: The information you provide will be collected, stored, processed and shared in accordance with the [Meta Privacy Policy](https://www.facebook.com/privacy/policy/).
|
| 187 |
extra_gated_button_content: Submit
|
| 188 |
+
widget:
|
| 189 |
+
- example_title: Winter holidays
|
| 190 |
+
messages:
|
| 191 |
+
- role: system
|
| 192 |
+
content: You are a helpful and honest assistant. Please, respond concisely and truthfully.
|
| 193 |
+
- role: user
|
| 194 |
+
content: Can you recommend a good destination for Winter holidays?
|
| 195 |
+
- example_title: Programming assistant
|
| 196 |
+
messages:
|
| 197 |
+
- role: system
|
| 198 |
+
content: You are a helpful and honest code and programming assistant. Please, respond concisely and truthfully.
|
| 199 |
+
- role: user
|
| 200 |
+
content: Write a function that computes the nth fibonacci number.
|
| 201 |
+
inference:
|
| 202 |
+
parameters:
|
| 203 |
+
max_new_tokens: 300
|
| 204 |
+
stop:
|
| 205 |
+
- <|end_of_text|>
|
| 206 |
+
- <|eot_id|>
|
| 207 |
---
|
| 208 |
|
| 209 |
## Model Details
|
|
|
|
| 304 |
"text-generation",
|
| 305 |
model=model_id,
|
| 306 |
model_kwargs={"torch_dtype": torch.bfloat16},
|
| 307 |
+
device="auto",
|
| 308 |
)
|
| 309 |
|
| 310 |
messages = [
|
|
|
|
| 319 |
)
|
| 320 |
|
| 321 |
terminators = [
|
| 322 |
+
pipeline.tokenizer.eos_token_id,
|
| 323 |
+
pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
|
| 324 |
]
|
| 325 |
|
| 326 |
outputs = pipeline(
|
generation_config.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
| 1 |
{
|
| 2 |
-
"_from_model_config": true,
|
| 3 |
"bos_token_id": 128000,
|
| 4 |
-
"eos_token_id": 128001,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"transformers_version": "4.40.0.dev0"
|
| 6 |
}
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"bos_token_id": 128000,
|
| 3 |
+
"eos_token_id": [128001, 128009],
|
| 4 |
+
"do_sample": true,
|
| 5 |
+
"temperature": 0.6,
|
| 6 |
+
"max_length": 4096,
|
| 7 |
+
"top_p": 0.9,
|
| 8 |
"transformers_version": "4.40.0.dev0"
|
| 9 |
}
|
tokenizer.json
CHANGED
|
@@ -2329,10 +2329,69 @@
|
|
| 2329 |
]
|
| 2330 |
},
|
| 2331 |
"post_processor": {
|
| 2332 |
-
"type": "
|
| 2333 |
-
"
|
| 2334 |
-
|
| 2335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2336 |
},
|
| 2337 |
"decoder": {
|
| 2338 |
"type": "ByteLevel",
|
|
@@ -2348,6 +2407,7 @@
|
|
| 2348 |
"end_of_word_suffix": null,
|
| 2349 |
"fuse_unk": false,
|
| 2350 |
"byte_fallback": false,
|
|
|
|
| 2351 |
"vocab": {
|
| 2352 |
"!": 0,
|
| 2353 |
"\"": 1,
|
|
|
|
| 2329 |
]
|
| 2330 |
},
|
| 2331 |
"post_processor": {
|
| 2332 |
+
"type": "Sequence",
|
| 2333 |
+
"processors": [
|
| 2334 |
+
{
|
| 2335 |
+
"type": "ByteLevel",
|
| 2336 |
+
"add_prefix_space": true,
|
| 2337 |
+
"trim_offsets": false,
|
| 2338 |
+
"use_regex": true
|
| 2339 |
+
},
|
| 2340 |
+
{
|
| 2341 |
+
"type": "TemplateProcessing",
|
| 2342 |
+
"single": [
|
| 2343 |
+
{
|
| 2344 |
+
"SpecialToken": {
|
| 2345 |
+
"id": "<|begin_of_text|>",
|
| 2346 |
+
"type_id": 0
|
| 2347 |
+
}
|
| 2348 |
+
},
|
| 2349 |
+
{
|
| 2350 |
+
"Sequence": {
|
| 2351 |
+
"id": "A",
|
| 2352 |
+
"type_id": 0
|
| 2353 |
+
}
|
| 2354 |
+
}
|
| 2355 |
+
],
|
| 2356 |
+
"pair": [
|
| 2357 |
+
{
|
| 2358 |
+
"SpecialToken": {
|
| 2359 |
+
"id": "<|begin_of_text|>",
|
| 2360 |
+
"type_id": 0
|
| 2361 |
+
}
|
| 2362 |
+
},
|
| 2363 |
+
{
|
| 2364 |
+
"Sequence": {
|
| 2365 |
+
"id": "A",
|
| 2366 |
+
"type_id": 0
|
| 2367 |
+
}
|
| 2368 |
+
},
|
| 2369 |
+
{
|
| 2370 |
+
"SpecialToken": {
|
| 2371 |
+
"id": "<|begin_of_text|>",
|
| 2372 |
+
"type_id": 1
|
| 2373 |
+
}
|
| 2374 |
+
},
|
| 2375 |
+
{
|
| 2376 |
+
"Sequence": {
|
| 2377 |
+
"id": "B",
|
| 2378 |
+
"type_id": 1
|
| 2379 |
+
}
|
| 2380 |
+
}
|
| 2381 |
+
],
|
| 2382 |
+
"special_tokens": {
|
| 2383 |
+
"<|begin_of_text|>": {
|
| 2384 |
+
"id": "<|begin_of_text|>",
|
| 2385 |
+
"ids": [
|
| 2386 |
+
128000
|
| 2387 |
+
],
|
| 2388 |
+
"tokens": [
|
| 2389 |
+
"<|begin_of_text|>"
|
| 2390 |
+
]
|
| 2391 |
+
}
|
| 2392 |
+
}
|
| 2393 |
+
}
|
| 2394 |
+
]
|
| 2395 |
},
|
| 2396 |
"decoder": {
|
| 2397 |
"type": "ByteLevel",
|
|
|
|
| 2407 |
"end_of_word_suffix": null,
|
| 2408 |
"fuse_unk": false,
|
| 2409 |
"byte_fallback": false,
|
| 2410 |
+
"ignore_merges": true,
|
| 2411 |
"vocab": {
|
| 2412 |
"!": 0,
|
| 2413 |
"\"": 1,
|
tokenizer_config.json
CHANGED
|
@@ -2050,7 +2050,7 @@
|
|
| 2050 |
}
|
| 2051 |
},
|
| 2052 |
"bos_token": "<|begin_of_text|>",
|
| 2053 |
-
"chat_template": "{% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{{ '<|start_header_id|>assistant<|end_header_id|>\n\n' }}",
|
| 2054 |
"clean_up_tokenization_spaces": true,
|
| 2055 |
"eos_token": "<|end_of_text|>",
|
| 2056 |
"model_input_names": [
|
|
|
|
| 2050 |
}
|
| 2051 |
},
|
| 2052 |
"bos_token": "<|begin_of_text|>",
|
| 2053 |
+
"chat_template": "{% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{% if add_generation_prompt %}{{ '<|start_header_id|>assistant<|end_header_id|>\n\n' }}{% endif %}",
|
| 2054 |
"clean_up_tokenization_spaces": true,
|
| 2055 |
"eos_token": "<|end_of_text|>",
|
| 2056 |
"model_input_names": [
|