赞
踩
llama2下载
在meta的官网 Meta website 进行下载申请(注意地区不要选择China会被ban)
主要有三类模型的参数:
一般需要魔法下载
基本的步骤:
下载原始的llama2-7b(13GB)和llama2-7b-chat(13G)
llama2使用
根据meta llama on GitHub的例子,我们可以按照以下步骤来运行llama2:
torchrun --nproc_per_node 1 example_text_completion.py \
--ckpt_dir llama-2-7b/ \
--tokenizer_path tokenizer.model \
--max_seq_len 128 --max_batch_size 4
torchrun --nproc_per_node 1 example_chat_completion.py \
--ckpt_dir llama-2-7b-chat/ \
--tokenizer_path tokenizer.model \
--max_seq_len 512 --max_batch_size 6
会得到以下结果:
I believe the meaning of life is > to be happy. I believe we are all born with the potential to be happy. The meaning of life is to be happy, but the way to get there is not always easy. The meaning of life is to be happy. It is not always easy to be happy, but it is possible. I believe that ================================== ....... ================================== Translate English to French: sea otter => loutre de mer peppermint => menthe poivrée plush girafe => girafe peluche cheese => > fromage fish => poisson giraffe => girafe elephant => éléphant cat => chat giraffe => girafe elephant => éléphant cat => chat giraffe => gira ==================================
......
==================================
System: Always answer with Haiku
User: I am going to Paris, what should I see?
> Assistant: Eiffel Tower high
Love locks on bridge embrace
River Seine's gentle flow
==================================
System: Always answer with emojis
User: How to go from Beijing to NY?
> Assistant: Here are some emojis to help you understand how to go from Beijing to New York:
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/383735
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。