Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

ego-hf
/
CodeLlama-7b-Python

GGUF
code
LLM
llama2
llama-2
CodeLlama
CodeLlama-Python
CodeLlama-7B-Python
lama.cpp
Python
7B
Model card Files Files and versions
xet
Community

Instructions to use ego-hf/CodeLlama-7b-Python with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • llama-cpp-python

    How to use ego-hf/CodeLlama-7b-Python with llama-cpp-python:

    # !pip install llama-cpp-python
    
    from llama_cpp import Llama
    
    llm = Llama.from_pretrained(
    	repo_id="ego-hf/CodeLlama-7b-Python",
    	filename="ggml-model-f32-00001-of-00010.gguf",
    )
    
    output = llm(
    	"Once upon a time,",
    	max_tokens=512,
    	echo=True
    )
    print(output)
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • llama.cpp

    How to use ego-hf/CodeLlama-7b-Python with llama.cpp:

    Install from brew
    brew install llama.cpp
    # Start a local OpenAI-compatible server with a web UI:
    llama-server -hf ego-hf/CodeLlama-7b-Python:F32
    # Run inference directly in the terminal:
    llama-cli -hf ego-hf/CodeLlama-7b-Python:F32
    Install from WinGet (Windows)
    winget install llama.cpp
    # Start a local OpenAI-compatible server with a web UI:
    llama-server -hf ego-hf/CodeLlama-7b-Python:F32
    # Run inference directly in the terminal:
    llama-cli -hf ego-hf/CodeLlama-7b-Python:F32
    Use pre-built binary
    # Download pre-built binary from:
    # https://github.com/ggerganov/llama.cpp/releases
    # Start a local OpenAI-compatible server with a web UI:
    ./llama-server -hf ego-hf/CodeLlama-7b-Python:F32
    # Run inference directly in the terminal:
    ./llama-cli -hf ego-hf/CodeLlama-7b-Python:F32
    Build from source code
    git clone https://github.com/ggerganov/llama.cpp.git
    cd llama.cpp
    cmake -B build
    cmake --build build -j --target llama-server llama-cli
    # Start a local OpenAI-compatible server with a web UI:
    ./build/bin/llama-server -hf ego-hf/CodeLlama-7b-Python:F32
    # Run inference directly in the terminal:
    ./build/bin/llama-cli -hf ego-hf/CodeLlama-7b-Python:F32
    Use Docker
    docker model run hf.co/ego-hf/CodeLlama-7b-Python:F32
  • LM Studio
  • Jan
  • Ollama

    How to use ego-hf/CodeLlama-7b-Python with Ollama:

    ollama run hf.co/ego-hf/CodeLlama-7b-Python:F32
  • Unsloth Studio new

    How to use ego-hf/CodeLlama-7b-Python with Unsloth Studio:

    Install Unsloth Studio (macOS, Linux, WSL)
    curl -fsSL https://unsloth.ai/install.sh | sh
    # Run unsloth studio
    unsloth studio -H 0.0.0.0 -p 8888
    # Then open http://localhost:8888 in your browser
    # Search for ego-hf/CodeLlama-7b-Python to start chatting
    Install Unsloth Studio (Windows)
    irm https://unsloth.ai/install.ps1 | iex
    # Run unsloth studio
    unsloth studio -H 0.0.0.0 -p 8888
    # Then open http://localhost:8888 in your browser
    # Search for ego-hf/CodeLlama-7b-Python to start chatting
    Using HuggingFace Spaces for Unsloth
    # No setup required
    # Open https://huggingface.co/spaces/unsloth/studio in your browser
    # Search for ego-hf/CodeLlama-7b-Python to start chatting
  • Docker Model Runner

    How to use ego-hf/CodeLlama-7b-Python with Docker Model Runner:

    docker model run hf.co/ego-hf/CodeLlama-7b-Python:F32
  • Lemonade

    How to use ego-hf/CodeLlama-7b-Python with Lemonade:

    Pull the model
    # Download Lemonade from https://lemonade-server.ai/
    lemonade pull ego-hf/CodeLlama-7b-Python:F32
    Run and chat with the model
    lemonade run user.CodeLlama-7b-Python-F32
    List all available models
    lemonade list
CodeLlama-7b-Python
27 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 6 commits
ego-hf's picture
ego-hf
Delete CodeLlama-7b-Python/.DS_Store
9f0deb0 verified about 2 years ago
  • CodeLlama-7b-Python
    Delete CodeLlama-7b-Python/.DS_Store about 2 years ago
  • .gitattributes
    2.43 kB
    CodeLlama-7b-Python about 2 years ago
  • README.md
    619 Bytes
    Add Model Card about 2 years ago