Instructions to use RecursiveSI/flint-int4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use RecursiveSI/flint-int4 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("RecursiveSI/flint-int4") 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 Settings
- LM Studio
- Pi
How to use RecursiveSI/flint-int4 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "RecursiveSI/flint-int4"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "RecursiveSI/flint-int4" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use RecursiveSI/flint-int4 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "RecursiveSI/flint-int4"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "RecursiveSI/flint-int4" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RecursiveSI/flint-int4", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use RecursiveSI/flint-int4 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 "RecursiveSI/flint-int4"
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 RecursiveSI/flint-int4
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use RecursiveSI/flint-int4 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "RecursiveSI/flint-int4"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "RecursiveSI/flint-int4" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Download config.json from RecursiveSI/flint-int4: direct link, hf CLI and curl.
- Browser
- Download file 3.08 kB
-
https://huggingface.co/RecursiveSI/flint-int4/resolve/main/config.json
- Command line
-
hf download hf://RecursiveSI/flint-int4/config.json
-
curl -L -o config.json https://huggingface.co/RecursiveSI/flint-int4/resolve/main/config.json
3.08 kB
| { | |
| "architectures": [ | |
| "FlintForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "attention_sink": true, | |
| "bos_token_id": 150000, | |
| "decoder_sparse_step": 1, | |
| "dtype": "bfloat16", | |
| "eos_token_id": [ | |
| 150001, | |
| 150003, | |
| 150005, | |
| 150018 | |
| ], | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 2048, | |
| "intermediate_size": 6144, | |
| "kv_group_size": 64, | |
| "kv_key_bits": 8, | |
| "kv_value_bits": 8, | |
| "layer_types": [ | |
| "full_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention" | |
| ], | |
| "max_position_embeddings": 262144, | |
| "mlp_only_layers": [ | |
| 0, | |
| 1 | |
| ], | |
| "mlx_export": { | |
| "bits": 4, | |
| "embedding_bits": 8, | |
| "full_attention_layers": [ | |
| 0, | |
| 1, | |
| 5, | |
| 9, | |
| 13, | |
| 17, | |
| 21, | |
| 25, | |
| 29, | |
| 33, | |
| 37, | |
| 41, | |
| 45, | |
| 48 | |
| ], | |
| "routed_expert_bits": 4, | |
| "scale_rule": "mse" | |
| }, | |
| "model_type": "flint", | |
| "moe_intermediate_size": 512, | |
| "no_rope_layer_indices": [ | |
| 0, | |
| 1, | |
| 5, | |
| 9, | |
| 13, | |
| 17, | |
| 21, | |
| 25, | |
| 29, | |
| 33, | |
| 37, | |
| 41, | |
| 45, | |
| 48 | |
| ], | |
| "norm_topk_prob": true, | |
| "num_attention_heads": 32, | |
| "num_experts": 256, | |
| "num_experts_per_tok": 6, | |
| "num_hidden_layers": 49, | |
| "num_key_value_heads": 4, | |
| "num_local_experts": 256, | |
| "output_router_logits": false, | |
| "quantization": { | |
| "bits": 4, | |
| "group_size": 64 | |
| }, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "rope_theta": 10000.0, | |
| "rope_type": "default" | |
| }, | |
| "rope_theta": 10000.0, | |
| "router_aux_loss_coef": 0.0, | |
| "router_expert_bias": false, | |
| "scoring_func": "sigmoid", | |
| "shared_expert_intermediate_size": 1024, | |
| "sliding_window": 513, | |
| "softmax_type": "learnable", | |
| "softmax_type_source": "model.attention_pattern.softmax_type", | |
| "tie_word_embeddings": false, | |
| "use_cache": true, | |
| "use_sliding_window": true, | |
| "vocab_size": 150144, | |
| "router_score_function": "sigmoid", | |
| "torch_dtype": "bfloat16", | |
| "pad_token_id": 150001 | |
| } | |