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

mlx-community
/
granite-4.0-1b-base-4bit

Text Generation
MLX
Safetensors
granitemoehybrid
language
granite-4.0
4-bit precision
Model card Files Files and versions
xet
Community

Instructions to use mlx-community/granite-4.0-1b-base-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use mlx-community/granite-4.0-1b-base-4bit 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/granite-4.0-1b-base-4bit")
    
    prompt = "Once upon a time in"
    text = generate(model, tokenizer, prompt=prompt, verbose=True)
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • LM Studio
  • MLX LM

    How to use mlx-community/granite-4.0-1b-base-4bit 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/granite-4.0-1b-base-4bit" --prompt "Once upon a time"
granite-4.0-1b-base-4bit
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
prince-canuma's picture
prince-canuma
Add files using upload-large-folder tool
37ebc09 verified 7 months ago
  • .gitattributes
    1.52 kB
    initial commit 7 months ago
  • README.md
    911 Bytes
    Add files using upload-large-folder tool 7 months ago
  • config.json
    2.43 kB
    Add files using upload-large-folder tool 7 months ago
  • generation_config.json
    147 Bytes
    Add files using upload-large-folder tool 7 months ago
  • merges.txt
    917 kB
    Add files using upload-large-folder tool 7 months ago
  • model.safetensors
    918 MB
    xet
    Add files using upload-large-folder tool 7 months ago
  • model.safetensors.index.json
    65.3 kB
    Add files using upload-large-folder tool 7 months ago
  • special_tokens_map.json
    579 Bytes
    Add files using upload-large-folder tool 7 months ago
  • tokenizer.json
    7.15 MB
    Add files using upload-large-folder tool 7 months ago
  • tokenizer_config.json
    17.7 kB
    Add files using upload-large-folder tool 7 months ago
  • vocab.json
    1.61 MB
    Add files using upload-large-folder tool 7 months ago