Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

mlx-community
/
CodeLlama-7b-Python-mlx

Text Generation
MLX
llama
facebook
meta
llama-2
Model card Files Files and versions
xet
Community
7

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

  • Libraries
  • MLX

    How to use mlx-community/CodeLlama-7b-Python-mlx with MLX:

    # Make sure mlx-lm is installed
    # pip install --upgrade mlx-lm
    # if on a CUDA device, also pip install mlx[cuda]
    
    # Generate text with mlx-lm
    from mlx_lm import load, generate
    
    model, tokenizer = load("mlx-community/CodeLlama-7b-Python-mlx")
    
    prompt = "Once upon a time in"
    text = generate(model, tokenizer, prompt=prompt, verbose=True)
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • LM Studio
  • MLX LM

    How to use mlx-community/CodeLlama-7b-Python-mlx with MLX LM:

    Generate or start a chat session
    # Install MLX LM
    uv tool install mlx-lm
    # Generate some text
    mlx_lm.generate --model "mlx-community/CodeLlama-7b-Python-mlx" --prompt "Once upon a time"
CodeLlama-7b-Python-mlx
13.5 GB
Ctrl+K
Ctrl+K
  • 4 contributors
History: 9 commits
pcuenq's picture
pcuenq HF Staff
lazarustda's picture
lazarustda
Updates README since the llama.py script has moved in mlx-examples (#7)
15618e5 verified about 2 years ago
  • .gitattributes
    1.52 kB
    initial commit over 2 years ago
  • LICENSE
    7.02 kB
    Upload folder using huggingface_hub (#1) over 2 years ago
  • README.md
    1.4 kB
    Updates README since the llama.py script has moved in mlx-examples (#7) about 2 years ago
  • USE_POLICY.md
    4.79 kB
    Upload folder using huggingface_hub (#1) over 2 years ago
  • config.json
    187 Bytes
    config-json (#5) over 2 years ago
  • tokenizer.model
    500 kB
    Upload folder using huggingface_hub (#1) over 2 years ago
  • weights.npz

    Pickle imports

    • No problematic imports detected

    What is a pickle import?

    13.5 GB
    xet
    update to new format over 2 years ago