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

  • Log In
  • Sign Up

mlx-community
/
gemma-2b-coder

Text Generation
MLX
Safetensors
code
gemma
Generated from Trainer
coding
Model card Files Files and versions
xet
Community

Instructions to use mlx-community/gemma-2b-coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use mlx-community/gemma-2b-coder 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/gemma-2b-coder")
    
    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/gemma-2b-coder 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/gemma-2b-coder" --prompt "Once upon a time"
gemma-2b-coder
2.19 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
mrm8488's picture
mrm8488
Upload folder using huggingface_hub
378fe21 verified about 2 years ago
  • .gitattributes
    1.57 kB
    Upload folder using huggingface_hub about 2 years ago
  • README.md
    808 Bytes
    Upload folder using huggingface_hub about 2 years ago
  • config.json
    2.38 kB
    Upload folder using huggingface_hub about 2 years ago
  • model.safetensors
    2.16 GB
    xet
    Upload folder using huggingface_hub about 2 years ago
  • model.safetensors.index.json
    29.3 kB
    Upload folder using huggingface_hub about 2 years ago
  • special_tokens_map.json
    555 Bytes
    Upload folder using huggingface_hub about 2 years ago
  • tokenizer.json
    17.5 MB
    xet
    Upload folder using huggingface_hub about 2 years ago
  • tokenizer.model
    4.24 MB
    xet
    Upload folder using huggingface_hub about 2 years ago
  • tokenizer_config.json
    1.11 kB
    Upload folder using huggingface_hub about 2 years ago