如何在本機執行 Code Llama
Run Code Llama locally
Code Llama 已可透過 Ollama 在本機執行,提供 7B、13B 和 34B 參數版本。原文列出 `ollama run codellama:7b`、`ollama run codellama:13b` 和 `ollama run codellama:34b` 命令;13B 版本要求 16GB+ 記憶體,34B 版本要求 32GB+。
文章列出 13B 和 34B 版本的記憶體要求,以及基礎模型和 Python 專用版的 Ollama 命令,方便按本機資源選擇版本。
Today, Meta Platforms, Inc., releases Code Llama to the public, based on Llama 2 to provide state-of-the-art performance among open models, infilling capabilities, support for large input contexts, and zero-shot instruction following ability for programming tasks.
Code Llama is now available on Ollama to try!
If you haven’t already, installed Ollama, please download it here.
For users to play with Code Llama:
Available with 7 billion, 13 billion (16GB+ of memory requirement) and 34 billion (32GB+ of memory requirement) parameters:
ollama run codellama:7b
ollama run codellama:13b
ollama run codellama:34b
Example prompt:
In Bash, how do I list all text files in the current directory (excluding subdirectories) that have been modified in the last month?
Foundation models and Python specializations are available for code generation/completions tasks
Foundation models:
ollama pull codellama:7b-code
ollama pull codellama:13b-code
ollama pull codellama:34b-code
Python specializations:
ollama pull codellama:7b-python
ollama pull codellama:13b-python
ollama pull codellama:34b-python
來源:Ollama:Blog · ollama.com