Text Generation
MLX
Safetensors
English
Korean
gemma4
gemma
gemma-4
abliterated
uncensored
uncensored-llm
no-refusal
apple-silicon
m-series
mac
quantized
conversational
roleplay
4-bit precision
Instructions to use dancinlab/supergemma4-e4b-abliterated-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use dancinlab/supergemma4-e4b-abliterated-MLX-4bit 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("dancinlab/supergemma4-e4b-abliterated-MLX-4bit") 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
- Pi new
How to use dancinlab/supergemma4-e4b-abliterated-MLX-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "dancinlab/supergemma4-e4b-abliterated-MLX-4bit"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "dancinlab/supergemma4-e4b-abliterated-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use dancinlab/supergemma4-e4b-abliterated-MLX-4bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "dancinlab/supergemma4-e4b-abliterated-MLX-4bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default dancinlab/supergemma4-e4b-abliterated-MLX-4bit
Run Hermes
hermes
- MLX LM
How to use dancinlab/supergemma4-e4b-abliterated-MLX-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "dancinlab/supergemma4-e4b-abliterated-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "dancinlab/supergemma4-e4b-abliterated-MLX-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dancinlab/supergemma4-e4b-abliterated-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
| { | |
| "architectures": [ | |
| "Gemma4ForConditionalGeneration" | |
| ], | |
| "audio_config": { | |
| "_name_or_path": "", | |
| "architectures": null, | |
| "attention_chunk_size": 12, | |
| "attention_context_left": 13, | |
| "attention_context_right": 0, | |
| "attention_invalid_logits_value": -1000000000.0, | |
| "attention_logit_cap": 50.0, | |
| "chunk_size_feed_forward": 0, | |
| "conv_kernel_size": 5, | |
| "dtype": "bfloat16", | |
| "gradient_clipping": 10000000000.0, | |
| "hidden_act": "silu", | |
| "hidden_size": 1024, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "initializer_range": 0.02, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "model_type": "gemma4_audio", | |
| "num_attention_heads": 8, | |
| "num_hidden_layers": 12, | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "output_proj_dims": 1536, | |
| "problem_type": null, | |
| "residual_weight": 0.5, | |
| "return_dict": true, | |
| "rms_norm_eps": 1e-06, | |
| "subsampling_conv_channels": [ | |
| 128, | |
| 32 | |
| ], | |
| "use_clipped_linears": true | |
| }, | |
| "audio_token_id": 258881, | |
| "boa_token_id": 256000, | |
| "boi_token_id": 255999, | |
| "dtype": "bfloat16", | |
| "eoa_token_id": 258883, | |
| "eoa_token_index": 258883, | |
| "eoi_token_id": 258882, | |
| "eos_token_id": [ | |
| 1, | |
| 106, | |
| 50 | |
| ], | |
| "image_token_id": 258880, | |
| "initializer_range": 0.02, | |
| "model_type": "gemma4", | |
| "quantization": { | |
| "group_size": 64, | |
| "bits": 4, | |
| "mode": "affine" | |
| }, | |
| "quantization_config": { | |
| "group_size": 64, | |
| "bits": 4, | |
| "mode": "affine" | |
| }, | |
| "text_config": { | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "attention_k_eq_v": false, | |
| "bos_token_id": 2, | |
| "dtype": "bfloat16", | |
| "enable_moe_block": false, | |
| "eos_token_id": 1, | |
| "expert_intermediate_size": null, | |
| "final_logit_softcapping": 30.0, | |
| "global_head_dim": 512, | |
| "head_dim": 256, | |
| "hidden_activation": "gelu_pytorch_tanh", | |
| "hidden_size": 2560, | |
| "hidden_size_per_layer_input": 256, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 10240, | |
| "layer_types": [ | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention" | |
| ], | |
| "max_position_embeddings": 131072, | |
| "model_type": "gemma4_text", | |
| "num_attention_heads": 8, | |
| "num_experts": null, | |
| "num_global_key_value_heads": null, | |
| "num_hidden_layers": 42, | |
| "num_key_value_heads": 2, | |
| "num_kv_shared_layers": 18, | |
| "pad_token_id": 0, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "full_attention": { | |
| "partial_rotary_factor": 0.25, | |
| "rope_theta": 1000000.0, | |
| "rope_type": "proportional" | |
| }, | |
| "sliding_attention": { | |
| "rope_theta": 10000.0, | |
| "rope_type": "default" | |
| } | |
| }, | |
| "sliding_window": 512, | |
| "tie_word_embeddings": true, | |
| "top_k_experts": null, | |
| "use_bidirectional_attention": null, | |
| "use_cache": true, | |
| "use_double_wide_mlp": false, | |
| "vocab_size": 262144, | |
| "vocab_size_per_layer_input": 262144 | |
| }, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.5.0.dev0", | |
| "video_token_id": 258884, | |
| "vision_soft_tokens_per_image": 280 | |
| } |