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

  • Log In
  • Sign Up

ethicalabs
/
Tower-Plus-2B-mlx

Text Generation
MLX
Safetensors
gemma2
conversational
🇪🇺 Region: EU
Model card Files Files and versions
xet
Community

Instructions to use ethicalabs/Tower-Plus-2B-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use ethicalabs/Tower-Plus-2B-mlx 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("ethicalabs/Tower-Plus-2B-mlx")
    
    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 ethicalabs/Tower-Plus-2B-mlx with MLX LM:

    Generate or start a chat session
    # Install MLX LM
    uv tool install mlx-lm
    # Interactive chat REPL
    mlx_lm.chat --model "ethicalabs/Tower-Plus-2B-mlx"
    Run an OpenAI-compatible server
    # Install MLX LM
    uv tool install mlx-lm
    # Start the server
    mlx_lm.server --model "ethicalabs/Tower-Plus-2B-mlx"
    # Calling the OpenAI-compatible server with curl
    curl -X POST "http://localhost:8000/v1/chat/completions" \
       -H "Content-Type: application/json" \
       --data '{
         "model": "ethicalabs/Tower-Plus-2B-mlx",
         "messages": [
           {"role": "user", "content": "Hello"}
         ]
       }'
Tower-Plus-2B-mlx
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
mrs83's picture
mrs83
Add files using upload-large-folder tool
e6728c1 verified 7 months ago
  • .gitattributes
    1.57 kB
    Add files using upload-large-folder tool 7 months ago
  • README.md
    943 Bytes
    Add files using upload-large-folder tool 7 months ago
  • chat_template.jinja
    305 Bytes
    Add files using upload-large-folder tool 7 months ago
  • config.json
    883 Bytes
    Add files using upload-large-folder tool 7 months ago
  • generation_config.json
    170 Bytes
    Add files using upload-large-folder tool 7 months ago
  • model.safetensors
    5.23 GB
    xet
    Add files using upload-large-folder tool 7 months ago
  • model.safetensors.index.json
    21.1 kB
    Add files using upload-large-folder tool 7 months ago
  • special_tokens_map.json
    644 Bytes
    Add files using upload-large-folder tool 7 months ago
  • tokenizer.json
    34.4 MB
    xet
    Add files using upload-large-folder tool 7 months ago
  • tokenizer_config.json
    46.4 kB
    Add files using upload-large-folder tool 7 months ago