alpindale / multi-token-prediction

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: July 08 2024

Introduction of multi-token-prediction

Model Details of multi-token-prediction

Multi-token prediction models and baselines

Models accompanying the research paper "Better & Faster Large Language Models via Multi-token Prediction" ( https://arxiv.org/abs/2404.19737 ).

Included are the following four 7B parameter models trained on code:

  • baseline model ( n=1 ) trained on 200B tokens of code: 7B_200B_1/
  • multi-token prediction model ( n=4 ) trained on 200B tokens of code: 7B_200B_4/
  • baseline model ( n=1 ) trained on 1T tokens of code: 7B_1T_1/
  • multi-token prediction model ( n=4 ) trained on 1T tokens of code: 7B_1T_4/

Tokenizer: standard Llama 2 SentencePiece tokenizer in tokenizer.model .

Quickstart

Install torch , fairscale , fire and sentencepiece and run

torchrun --nproc_per_node 1 example_completion.py --ckpt_dir 7B_200B_4/ --tokenizer_path tokenizer.model --max_seq_len 128 --max_batch_size 2

replacing 7B_200B_4 by the respective checkpoint directory.

Format

The Pytorch state_dicts are compatible with Llama format: the layers of the shared trunk and the next-token prediction head layer are numbered contiguously. Additional prediction heads for tokens further in the future are names extra_heads and can be ignored for standard autoregressive inference.

The implementation of forward() in llama/model.py provides an additional argument return_all_heads . If set, the additional prediction heads are called and the logits are returned in shape (batch_size, seq_len, n_future_tokens, vocab_size) . Otherwise, the logit's shape is (batch_size, seq_len, 1, vocab_size) .

Citation

Gloeckle, F., Idrissi, B. Y., Rozière, B., Lopez-Paz, D., & Synnaeve, G. (2024). Better & faster large language models via multi-token prediction. arXiv preprint arXiv:2404.19737.

Bibtex entry:

@article{gloeckle2024better,
  title={Better \& faster large language models via multi-token prediction},
  author={Gloeckle, Fabian and Idrissi, Badr Youbi and Rozi{\`e}re, Baptiste and Lopez-Paz, David and Synnaeve, Gabriel},
  journal={arXiv preprint arXiv:2404.19737},
  year={2024}
}
Feedback and comments

Please report risks as indicated in the Acceptable Use Policy and address bugs and any other comments to the corresponding authors as indicated in the research paper.

Runs of alpindale multi-token-prediction on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About multi-token-prediction huggingface.co Model

More multi-token-prediction license Visit here:

https://choosealicense.com/licenses/other

multi-token-prediction huggingface.co

multi-token-prediction huggingface.co is an AI model on huggingface.co that provides multi-token-prediction's model effect (), which can be used instantly with this alpindale multi-token-prediction model. huggingface.co supports a free trial of the multi-token-prediction model, and also provides paid use of the multi-token-prediction. Support call multi-token-prediction model through api, including Node.js, Python, http.

multi-token-prediction huggingface.co Url

https://huggingface.co/alpindale/multi-token-prediction

alpindale multi-token-prediction online free

multi-token-prediction huggingface.co is an online trial and call api platform, which integrates multi-token-prediction's modeling effects, including api services, and provides a free online trial of multi-token-prediction, you can try multi-token-prediction online for free by clicking the link below.

alpindale multi-token-prediction online free url in huggingface.co:

https://huggingface.co/alpindale/multi-token-prediction

multi-token-prediction install

multi-token-prediction is an open source model from GitHub that offers a free installation service, and any user can find multi-token-prediction on GitHub to install. At the same time, huggingface.co provides the effect of multi-token-prediction install, users can directly use multi-token-prediction installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

multi-token-prediction install url in huggingface.co:

https://huggingface.co/alpindale/multi-token-prediction

Url of multi-token-prediction

multi-token-prediction huggingface.co Url

Provider of multi-token-prediction huggingface.co

alpindale
ORGANIZATIONS

Other API from alpindale

huggingface.co

Total runs: 326
Run Growth: 118
Growth Rate: 35.98%
Updated:February 21 2024
huggingface.co

Total runs: 145
Run Growth: -135
Growth Rate: -96.43%
Updated:February 21 2024
huggingface.co

Total runs: 58
Run Growth: -20
Growth Rate: -33.90%
Updated:February 21 2024
huggingface.co

Total runs: 45
Run Growth: 0
Growth Rate: 0.00%
Updated:August 23 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 27 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 19 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 31 2023