Compare commits

..

10 Commits

Author SHA1 Message Date
Varun Vontimitta
5f0b02c75b
Expose metadata link to next version of the model (#182)
- Expose metadata link to next version of the model (05ca7f87447657b73816aed907a2579c74e5b2cf)


Co-authored-by: Daniel van Strien <davanstrien@users.noreply.huggingface.co>
2024-09-27 15:52:39 +00:00
Omar Sanseviero
e1945c40cd
Update README.md (#75)
- Update README.md (129019f3f22ae389b7817877283f184dad062a9b)


Co-authored-by: Akshay L Aradhya <DollarAkshay@users.noreply.huggingface.co>
2024-05-29 12:27:16 +00:00
Omar Sanseviero
906e058d22
Update README.md (#118)
- Update README.md (02bf128f36f0a0e3aace3c8f25fec1e07b468db7)
- Update README.md (21014479dba59d2ee7bd508cee9e2463eaf18732)


Co-authored-by: Matthew Carrigan <Rocketknight1@users.noreply.huggingface.co>
2024-05-29 12:27:10 +00:00
Omar Sanseviero
c4a54320a5
Change license from other to llama3 (#92)
- Change license from other to llama3 (39cf69808fb4b8465404b19566827d706b0eab4f)
2024-05-13 09:35:55 +00:00
Arthur Zucker
4d6c61da05
Update config.json (#105)
- Update config.json (1bd790873a4163298eee9920db72439fff5815b1)
2024-05-13 06:54:16 +00:00
Arthur Zucker
a8977699a3
Update tokenizer_config.json (#60)
- Update tokenizer_config.json (81e3437ab8e8e883c74b96df85196f3434c39d1c)


Co-authored-by: NAVANIT DUBEY <Navanit-shorthills@users.noreply.huggingface.co>
2024-05-10 06:24:30 +00:00
Arthur Zucker
e5e23bbe8e
Update generation_config.json (#62)
- Update generation_config.json (368ba9bdb79a9dc34f489925e9f9440bc597c361)
2024-04-24 15:41:55 +00:00
Pedro Cuenca
7840f95a8c
Update examples and widget inference parameters (#53)
- Update examples and widget inference parameters (f4aaf8ca1ce0b4337954df015bf719d5e464452a)
2024-04-23 15:46:37 +00:00
Pedro Cuenca
339ce92d05
Update post-processor to add bos (#42)
- Update post-processor to add bos (4d3ac242e1d717fbebaa94154be38077f4e1623b)
2024-04-23 11:33:49 +00:00
Pedro Cuenca
74fedae5f7
Fix typo in pipeline device argument (#48)
- Fix typo in pipeline device argument (346ad49926472b69607b89966a270af1da03fe57)


Co-authored-by: Chandan Singh <csinva@users.noreply.huggingface.co>
2024-04-23 11:33:24 +00:00
5 changed files with 98 additions and 20 deletions

@ -8,9 +8,8 @@ tags:
- pytorch
- llama
- llama-3
license: other
license_name: llama3
license_link: LICENSE
license: llama3
new_version: meta-llama/Llama-3.1-8B-Instruct
extra_gated_prompt: >-
### META LLAMA 3 COMMUNITY LICENSE AGREEMENT
@ -185,6 +184,29 @@ extra_gated_fields:
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
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/).
extra_gated_button_content: Submit
widget:
- example_title: Hello
messages:
- role: user
content: Hey my name is Julien! How are you?
- example_title: Winter holidays
messages:
- role: system
content: You are a helpful and honest assistant. Please, respond concisely and truthfully.
- role: user
content: Can you recommend a good destination for Winter holidays?
- example_title: Programming assistant
messages:
- role: system
content: You are a helpful and honest code and programming assistant. Please, respond concisely and truthfully.
- role: user
content: Write a function that computes the nth fibonacci number.
inference:
parameters:
max_new_tokens: 300
stop:
- <|end_of_text|>
- <|eot_id|>
---
## Model Details
@ -287,7 +309,7 @@ pipeline = transformers.pipeline(
"text-generation",
model=model_id,
model_kwargs={"torch_dtype": torch.bfloat16},
device="auto",
device_map="auto",
)
messages = [
@ -295,26 +317,20 @@ messages = [
{"role": "user", "content": "Who are you?"},
]
prompt = pipeline.tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
terminators = [
pipeline.tokenizer.eos_token_id,
pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
]
outputs = pipeline(
prompt,
messages,
max_new_tokens=256,
eos_token_id=terminators,
do_sample=True,
temperature=0.6,
top_p=0.9,
)
print(outputs[0]["generated_text"][len(prompt):])
print(outputs[0]["generated_text"][-1])
```
#### Transformers AutoModelForCausalLM
@ -432,7 +448,7 @@ For Hugging Face support, we recommend using transformers or TGI, but a similar
**Overview** Llama 3 was pretrained on over 15 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over 10M human-annotated examples. Neither the pretraining nor the fine-tuning datasets include Meta user data.
**Data Freshness** The pretraining data has a cutoff of March 2023 for the 7B and December 2023 for the 70B models respectively.
**Data Freshness** The pretraining data has a cutoff of March 2023 for the 8B and December 2023 for the 70B models respectively.
## Benchmarks

@ -5,7 +5,7 @@
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 128000,
"eos_token_id": 128001,
"eos_token_id": 128009,
"hidden_act": "silu",
"hidden_size": 4096,
"initializer_range": 0.02,

@ -1,6 +1,9 @@
{
"_from_model_config": true,
"bos_token_id": 128000,
"eos_token_id": [128001, 128009],
"do_sample": true,
"temperature": 0.6,
"max_length": 4096,
"top_p": 0.9,
"transformers_version": "4.40.0.dev0"
}

@ -2329,10 +2329,69 @@
]
},
"post_processor": {
"type": "ByteLevel",
"add_prefix_space": true,
"trim_offsets": false,
"use_regex": true
"type": "Sequence",
"processors": [
{
"type": "ByteLevel",
"add_prefix_space": true,
"trim_offsets": false,
"use_regex": true
},
{
"type": "TemplateProcessing",
"single": [
{
"SpecialToken": {
"id": "<|begin_of_text|>",
"type_id": 0
}
},
{
"Sequence": {
"id": "A",
"type_id": 0
}
}
],
"pair": [
{
"SpecialToken": {
"id": "<|begin_of_text|>",
"type_id": 0
}
},
{
"Sequence": {
"id": "A",
"type_id": 0
}
},
{
"SpecialToken": {
"id": "<|begin_of_text|>",
"type_id": 1
}
},
{
"Sequence": {
"id": "B",
"type_id": 1
}
}
],
"special_tokens": {
"<|begin_of_text|>": {
"id": "<|begin_of_text|>",
"ids": [
128000
],
"tokens": [
"<|begin_of_text|>"
]
}
}
}
]
},
"decoder": {
"type": "ByteLevel",

@ -2052,7 +2052,7 @@
"bos_token": "<|begin_of_text|>",
"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 %}",
"clean_up_tokenization_spaces": true,
"eos_token": "<|end_of_text|>",
"eos_token": "<|eot_id|>",
"model_input_names": [
"input_ids",
"attention_mask"