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

  • Log In
  • Sign Up

DamienDrash
/
CodeLlama-70B-Instruct

Text Generation
MLX
code
llama
llama-2
conversational
Model card Files Files and versions
xet
Community

Instructions to use DamienDrash/CodeLlama-70B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use DamienDrash/CodeLlama-70B-Instruct with MLX:

    # Make sure mlx-lm is installed
    # pip install --upgrade mlx-lm
    
    # Generate text with mlx-lm
    from mlx_lm import load, generate
    
    model, tokenizer = load("DamienDrash/CodeLlama-70B-Instruct")
    
    prompt = "Write a story about Einstein"
    messages = [{"role": "user", "content": prompt}]
    prompt = tokenizer.apply_chat_template(
        messages, add_generation_prompt=True
    )
    
    text = generate(model, tokenizer, prompt=prompt, verbose=True)
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • LM Studio
  • MLX LM

    How to use DamienDrash/CodeLlama-70B-Instruct with MLX LM:

    Generate or start a chat session
    # Install MLX LM
    uv tool install mlx-lm
    # Interactive chat REPL
    mlx_lm.chat --model "DamienDrash/CodeLlama-70B-Instruct"
    Run an OpenAI-compatible server
    # Install MLX LM
    uv tool install mlx-lm
    # Start the server
    mlx_lm.server --model "DamienDrash/CodeLlama-70B-Instruct"
    # Calling the OpenAI-compatible server with curl
    curl -X POST "http://localhost:8000/v1/chat/completions" \
       -H "Content-Type: application/json" \
       --data '{
         "model": "DamienDrash/CodeLlama-70B-Instruct",
         "messages": [
           {"role": "user", "content": "Hello"}
         ]
       }'
CodeLlama-70B-Instruct
16 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 5 commits
DamienDrash's picture
DamienDrash
Upload model-00003-of-00008.safetensors
9bd075b verified about 2 years ago
  • .gitattributes
    1.52 kB
    initial commit about 2 years ago
  • README.md
    852 Bytes
    Upload 7 files about 2 years ago
  • added_tokens.json
    22 Bytes
    Upload 7 files about 2 years ago
  • config.json
    2.3 kB
    Upload 7 files about 2 years ago
  • model-00001-of-00008.safetensors
    5.34 GB
    xet
    Upload model-00001-of-00008.safetensors about 2 years ago
  • model-00002-of-00008.safetensors
    5.34 GB
    xet
    Upload model-00002-of-00008.safetensors about 2 years ago
  • model-00003-of-00008.safetensors
    5.33 GB
    xet
    Upload model-00003-of-00008.safetensors about 2 years ago
  • special_tokens_map.json
    414 Bytes
    Upload 7 files about 2 years ago
  • tokenizer.json
    1.84 MB
    Upload 7 files about 2 years ago
  • tokenizer.model
    500 kB
    xet
    Upload 7 files about 2 years ago
  • tokenizer_config.json
    1.66 kB
    Upload 7 files about 2 years ago