2 Star 0 Fork 0

mirrors_huggingface/huggingface-llama-recipes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Hugging Face Llama Recipes

🤗🦙Welcome! This repository contains minimal recipes to get started with Llama 3.1 quickly.

This repository is WIP so that you might see considerable changes in the coming days.

Local Inference

Would you like to run inference of the Llama 3.1 models locally? So do we! The memory requirements depend on the model size and the precision of the weights. Here's a table showing the approximate memory needed for different configurations:

Model Size FP16 FP8 INT4 (AWQ/GPTQ/bnb)
8B 16 GB 8 GB 4 GB
70B 140 GB 70 GB 35 GB
405B 810 GB 405 GB 203 GB

Note: These are estimated values and may vary based on specific implementation details and optimizations.

Here are some notebooks to help you started:

  • Run Llama 8B in free Google Colab in half precision
  • Run Llama 8B in 8-bit and 4-bit!
  • Run Llama with AWQ
  • Execute some Llama-generated Python code
  • Use tools with Llama!

API inference

Are these models too large for you to run at home? Would you like to experiment with Llama 405B? Try out the following examples!

  • Use the Inference API for PRO users
  • Use a dedicated Inference Endpoint

Llama Guard and Prompt Guard

In addition to the generative models, Meta released two new models: Llama Guard 3 and Prompt Guard. Prompt Guard is a small classifier that detects prompt injections and jailbreaks. Llama Guard 3 is a safeguard model that can classify LLM inputs and generations. Learn how to use them as done in the following notebooks:

  • Detecting jailbreaking with Prompt Guard
  • Using Llama Guard for Guardrailing

Advanced use cases

  • How to fine-tune Llama 3.1 8B on consumer GPU with trl and QLoRA
  • Generate synthetic data with distilabel
  • Do assisted decoding with a large and a small model
  • Build a ML demo using Gradio

空文件

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_huggingface/huggingface-llama-recipes.git
git@gitee.com:mirrors_huggingface/huggingface-llama-recipes.git
mirrors_huggingface
huggingface-llama-recipes
huggingface-llama-recipes
ArthurZucker-patch-1

搜索帮助