[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72006":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":24,"topics":25,"createdAt":9,"pushedAt":9,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},72006,"llama-models","meta-llama\u002Fllama-models","meta-llama","Utilities intended for use with Llama models.",null,"Python",7626,1386,109,180,0,1,11,26,3,75.53,"Other",false,"main",true,[],"2026-06-12 04:01:03","\u003Cp align=\"center\">\n  \u003Cimg src=\"\u002FLlama_Repo.jpeg\" width=\"400\"\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n        🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fmeta-Llama\"> Models on Hugging Face\u003C\u002Fa>&nbsp | \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fblog\u002F\"> Blog\u003C\u002Fa>&nbsp |  \u003Ca href=\"https:\u002F\u002Fllama.meta.com\u002F\">Website\u003C\u002Fa>&nbsp | \u003Ca href=\"https:\u002F\u002Fllama.meta.com\u002Fget-started\u002F\">Get Started\u003C\u002Fa>&nbsp | \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmeta-llama\u002Fllama-cookbook\">Llama Cookbook\u003C\u002Fa>&nbsp\n\u003Cbr>\n\n---\n\n# Llama Models\n\nLlama is an accessible, open large language model (LLM) designed for developers, researchers, and businesses to build, experiment, and responsibly scale their generative AI ideas. Part of a foundational system, it serves as a bedrock for innovation in the global community. A few key aspects:\n1. **Open access**: Easy accessibility to cutting-edge large language models, fostering collaboration and advancements among developers, researchers, and organizations\n2. **Broad ecosystem**: Llama models have been downloaded hundreds of millions of times, there are thousands of community projects built on Llama and platform support is broad from cloud providers to startups - the world is building with Llama!\n3. **Trust & safety**: Llama models are part of a comprehensive approach to trust and safety, releasing models and tools that are designed to enable community collaboration and encourage the standardization of the development and usage of trust and safety tools for generative AI\n\nOur mission is to empower individuals and industry through this opportunity while fostering an environment of discovery and ethical AI advancements. The model weights are licensed for researchers and commercial entities, upholding the principles of openness.\n\n## Llama Models\n\n[![PyPI - Downloads](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fllama-models)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fllama-models\u002F)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1257833999603335178)](https:\u002F\u002Fdiscord.gg\u002FTZAAYNVtrU)\n\n|  **Model** | **Launch date** | **Model sizes** | **Context Length** | **Tokenizer** | **Acceptable use policy**  |  **License** | **Model Card** |\n| :----: | :----: | :----: | :----:|:----:|:----:|:----:|:----:|\n| Llama 2 | 7\u002F18\u002F2023 | 7B, 13B, 70B | 4K | Sentencepiece | [Use Policy](models\u002Fllama2\u002FUSE_POLICY.md) | [License](models\u002Fllama2\u002FLICENSE) | [Model Card](models\u002Fllama2\u002FMODEL_CARD.md) |\n| Llama 3 | 4\u002F18\u002F2024 | 8B, 70B | 8K | TikToken-based | [Use Policy](models\u002Fllama3\u002FUSE_POLICY.md) | [License](models\u002Fllama3\u002FLICENSE) | [Model Card](models\u002Fllama3\u002FMODEL_CARD.md) |\n| Llama 3.1 | 7\u002F23\u002F2024 | 8B, 70B, 405B | 128K | TikToken-based | [Use Policy](models\u002Fllama3_1\u002FUSE_POLICY.md) | [License](models\u002Fllama3_1\u002FLICENSE) | [Model Card](models\u002Fllama3_1\u002FMODEL_CARD.md) |\n| Llama 3.2 | 9\u002F25\u002F2024 | 1B, 3B | 128K | TikToken-based | [Use Policy](models\u002Fllama3_2\u002FUSE_POLICY.md) | [License](models\u002Fllama3_2\u002FLICENSE) | [Model Card](models\u002Fllama3_2\u002FMODEL_CARD.md) |\n| Llama 3.2-Vision | 9\u002F25\u002F2024 | 11B, 90B | 128K | TikToken-based | [Use Policy](models\u002Fllama3_2\u002FUSE_POLICY.md) | [License](models\u002Fllama3_2\u002FLICENSE) | [Model Card](models\u002Fllama3_2\u002FMODEL_CARD_VISION.md) |\n| Llama 3.3 | 12\u002F04\u002F2024 | 70B | 128K | TikToken-based | [Use Policy](models\u002Fllama3_3\u002FUSE_POLICY.md) | [License](models\u002Fllama3_3\u002FLICENSE) | [Model Card](models\u002Fllama3_3\u002FMODEL_CARD.md) |\n| Llama 4 | 4\u002F5\u002F2025 | Scout-17B-16E, Maverick-17B-128E | 10M, 1M | TikToken-based | [Use Policy](models\u002Fllama4\u002FUSE_POLICY.md) | [License](models\u002Fllama4\u002FLICENSE) | [Model Card](models\u002Fllama4\u002FMODEL_CARD.md) |\n\n## Download\n\nTo download the model weights and tokenizer:\n\n1. Visit the [Meta Llama website](https:\u002F\u002Fllama.meta.com\u002Fllama-downloads\u002F).\n2. Read and accept the license.\n3. Once your request is approved you will receive a signed URL via email.\n4. Install the Llama Models CLI: `pip install llama-models`. (**\u003C-- Start Here if you have received an email already.**)\n5. Run `llama-model list` to show the latest available models and determine the model ID you wish to download. **NOTE**:\nIf you want older versions of models, run `llama-model list --show-all` to show all the available Llama models.\n\n6. Run: `llama-model download --source meta --model-id CHOSEN_MODEL_ID`\n7. Pass the URL provided when prompted to start the download.\n\nRemember that the links expire after 24 hours and a certain amount of downloads. You can always re-request a link if you start seeing errors such as `403: Forbidden`.\n\n### CLI Commands Reference\n\nOnce installed, the `llama-model` CLI provides the following commands:\n\n```bash\nllama-model list              # List available models\nllama-model list --show-all   # List all models (including older versions)\nllama-model describe -m MODEL_ID     # Show detailed information about a model\nllama-model download          # Download models from Meta or Hugging Face\nllama-model verify-download   # Verify integrity of downloaded models\nllama-model remove -m MODEL_ID       # Remove a downloaded model\nllama-model prompt-format -m MODEL_ID  # Show the prompt format for a model\n```\n\nFor detailed help on any command, run `llama-model COMMAND --help`.\n\n## Running the models\n\nIn order to run the models, you will need to install dependencies after checking out the repository.\n\n```bash\n# Run this within a suitable Python environment (uv, conda, or virtualenv)\npip install .[torch]\n```\n\nExample scripts are available in `models\u002F{ llama3, llama4 }\u002Fscripts\u002F` sub-directory. Note that the Llama4 series of models require at least 4 GPUs to run inference at full (bf16) precision.\n\n```bash\n#!\u002Fbin\u002Fbash\n\nNGPUS=4\nCHECKPOINT_DIR=~\u002F.llama\u002Fcheckpoints\u002FLlama-4-Scout-17B-16E-Instruct\nPYTHONPATH=$(git rev-parse --show-toplevel) \\\n  torchrun --nproc_per_node=$NGPUS \\\n  -m models.llama4.scripts.chat_completion $CHECKPOINT_DIR \\\n  --world_size $NGPUS\n```\n\nThe above script should be used with an Instruct (Chat) model. For a Base model, update the `CHECKPOINT_DIR` path and use the script `models.llama4.scripts.completion`.\n\n\n## Running inference with FP8 and Int4 Quantization\n\nYou can reduce the memory footprint of the models at the cost of minimal loss in accuracy by running inference with FP8 or Int4 quantization. Use the `--quantization-mode` flag to specify the quantization mode. There are two modes:\n- `fp8_mixed`: Mixed precision inference with FP8 for some weights and bfloat16 for activations.\n- `int4_mixed`: Mixed precision inference with Int4 for some weights and bfloat16 for activations.\n\nUsing FP8, running Llama-4-Scout-17B-16E-Instruct requires 2 GPUs with 80GB of memory. Using Int4, you need a single GPU with 80GB of memory.\n\n```bash\nMODE=fp8_mixed  # or int4_mixed\nif [ $MODE == \"fp8_mixed\" ]; then\n  NGPUS=2\nelse\n  NGPUS=1\nfi\nCHECKPOINT_DIR=~\u002F.llama\u002Fcheckpoints\u002FLlama-4-Scout-17B-16E-Instruct\nPYTHONPATH=$(git rev-parse --show-toplevel) \\\n  torchrun --nproc_per_node=$NGPUS \\\n  -m models.llama4.scripts.chat_completion $CHECKPOINT_DIR \\\n  --world_size $NGPUS \\\n  --quantization-mode $MODE\n```\n\n\nFor more flexibility in running inference (including using other providers), please see the [`Llama Stack`](https:\u002F\u002Fgithub.com\u002Fmeta-llama\u002Fllama-stack) toolset.\n\n\n## Access to Hugging Face\n\nWe also provide downloads on [Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fmeta-llama), in both transformers and native `llama4` formats. To download the weights from Hugging Face, please follow these steps:\n\n- Visit one of the repos, for example [meta-llama\u002FLlama-4-Scout-17B-16E](https:\u002F\u002Fhuggingface.co\u002Fmeta-llama\u002FLlama-4-Scout-17B-16E).\n- Read and accept the license. Once your request is approved, you'll be granted access to all Llama 3.1 models as well as previous versions. Note that requests used to take up to one hour to get processed.\n- To download the original native weights to use with this repo, click on the \"Files and versions\" tab and download the contents of the `original` folder. You can also download them from the command line if you `pip install huggingface-hub`:\n\n```bash\nhuggingface-cli download meta-llama\u002FLlama-4-Scout-17B-16E-Instruct-Original --local-dir meta-llama\u002FLlama-4-Scout-17B-16E-Instruct-Original\n```\n\n- To use with transformers, the following snippet will download and cache the weights:\n\n  ```python\n  # inference.py\n  from transformers import AutoTokenizer, Llama4ForConditionalGeneration\n  import torch\n\n  model_id = \"meta-llama\u002FLlama-4-Scout-17B-16E-Instruct\"\n\n  tokenizer = AutoTokenizer.from_pretrained(model_id)\n\n  messages = [\n      {\"role\": \"user\", \"content\": \"Who are you?\"},\n  ]\n  inputs = tokenizer.apply_chat_template(\n      messages, add_generation_prompt=True, return_tensors=\"pt\", return_dict=True\n  )\n\n  model = Llama4ForConditionalGeneration.from_pretrained(\n      model_id, device_map=\"auto\", torch_dtype=torch.bfloat16\n  )\n\n  outputs = model.generate(**inputs.to(model.device), max_new_tokens=100)\n  outputs = tokenizer.batch_decode(outputs[:, inputs[\"input_ids\"].shape[-1] :])\n  print(outputs[0])\n  ```\n  ```bash\n   torchrun --nnodes=1 --nproc_per_node=8 inference.py\n   ```\n\n## Installations\n\nYou can install this repository as a [package](https:\u002F\u002Fpypi.org\u002Fproject\u002Fllama-models\u002F) by just doing `pip install llama-models`\n\n## Responsible Use\n\nLlama models are a new technology that carries potential risks with use. Testing conducted to date has not — and could not — cover all scenarios.\nTo help developers address these risks, we have created the [Responsible Use Guide](https:\u002F\u002Fai.meta.com\u002Fstatic-resource\u002Fresponsible-use-guide\u002F).\n\n## Issues\n\nPlease report any software “bug” or other problems with the models through one of the following means:\n- Reporting issues with the model: [https:\u002F\u002Fgithub.com\u002Fmeta-llama\u002Fllama-models\u002Fissues](https:\u002F\u002Fgithub.com\u002Fmeta-llama\u002Fllama-models\u002Fissues)\n- Reporting risky content generated by the model: [developers.facebook.com\u002Fllama_output_feedback](http:\u002F\u002Fdevelopers.facebook.com\u002Fllama_output_feedback)\n- Reporting bugs and security concerns: [facebook.com\u002Fwhitehat\u002Finfo](http:\u002F\u002Ffacebook.com\u002Fwhitehat\u002Finfo)\n\n\n## Questions\n\nFor common questions, the FAQ can be found [here](https:\u002F\u002Fllama.meta.com\u002Ffaq), which will be updated over time as new questions arise.\n","Llama Models 是一个开源的大规模语言模型项目，旨在为开发者、研究人员和企业提供构建、实验和扩展生成式AI应用的基础。其核心功能包括易于访问的先进语言模型、广泛的生态系统支持以及强调信任与安全的设计理念。技术特点上，Llama 支持多种模型尺寸（从7亿到4050亿参数不等），并提供不同的上下文长度选项，采用Sentencepiece或TikToken作为分词器。该项目适用于需要高质量自然语言处理能力的各种场景，如文本生成、对话系统开发、内容创作等，尤其适合那些希望在确保安全性和透明度的前提下推动AI研究与应用创新的个人或组织。",2,"2026-06-11 03:39:56","high_star"]