--- library_name: mlx pipeline_tag: text-generation model_type: spark2_5 parameters: 1.71B tags: - mlx - text-generation - quantized - spark2_5 - ridge_4_6_8 base_model: - XHToken/Spark-X2.5-1.7B --- # dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx MLX conversion of a GGUF model (converted by llama.cpp from XHToken/Spark-X2.5-1.7B-INT8), quantized with a ridge_4_6_8 recipe. Ridge policy ridge_4_6_8 (Spark-X2.5): 4-bit middle FFN (`mlp.gate/up/down_proj`), 6-bit sliding-layer `attn_qkv` (`self_attn.q_k_v_proj`), `out_proj`, and edge FFN layers, and 8-bit protection for the sensitive control path: the per-head sigmoid gate `attn_gate` (`self_attn.g_proj`) and the fused `attn_qkv` of every `full_attention` layer (the long-context path with 2-wide, 256-dim KV). The tied embedding (`model.embedding`, doubling as the output unembedding) and `lm_head` are 6-bit; norms stay fp16. Supported runtime: mlx_lm (upgraded to support the model type). True parameter count: 1.71B. (HF's automatic 'Model size' badge apparently undercounts MLX quantized models because the packed weights are stored at <=8 bits per element.) ## Usage ```python from mlx_lm import load, generate model, tokenizer = load("dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx") print(generate(model, tokenizer, prompt="hello")) ``` ## Example generation ```text mlx_lm.generate --model dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx --prompt "What is the square root of 2?" --max-tokens 400 ========== The user asked "What is the square root of 2?" I need to provide the value of the square root of 2. The square root of 2 is an irrational number, approximately 1.41421356237... I should provide the exact value and the approximate decimal value. Let me structure the response: 1. State the exact value: √2 2. Provide the approximate decimal value: approximately 1.4142 3. Maybe mention it's irrational. Let me make sure the answer is clear and accurate.The square root of 2 is an irrational number, which means it cannot be expressed as a simple fraction. - **Exact value:** √2 - **Approximate value:** ≈ 1.41421356237... So, the square root of 2 is approximately **1.4142**. ========== Prompt: 25 tokens, 215.179 tokens-per-sec Generation: 208 tokens, 41.483 tokens-per-sec Peak memory: 1.253 GB (M1 MacBook Air) ```