Text Generation
GGUF
Safetensors
English
mark_slm_v2
llama.cpp
deepseek2
mixture-of-experts
multi-head-latent-attention
iq4_nl
mark-ai
systems-engineering
custom_code
conversational
Instructions to use miceworks/Mark-SLM-V2-302M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use miceworks/Mark-SLM-V2-302M with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf miceworks/Mark-SLM-V2-302M:IQ4_NL # Run inference directly in the terminal: llama cli -hf miceworks/Mark-SLM-V2-302M:IQ4_NL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf miceworks/Mark-SLM-V2-302M:IQ4_NL # Run inference directly in the terminal: llama cli -hf miceworks/Mark-SLM-V2-302M:IQ4_NL
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf miceworks/Mark-SLM-V2-302M:IQ4_NL # Run inference directly in the terminal: ./build/bin/llama cli -hf miceworks/Mark-SLM-V2-302M:IQ4_NL
Use Docker
docker model run hf.co/miceworks/Mark-SLM-V2-302M:IQ4_NL
- Llama new
- LM Studio
- Jan
- vLLM
How to use miceworks/Mark-SLM-V2-302M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "miceworks/Mark-SLM-V2-302M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "miceworks/Mark-SLM-V2-302M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/miceworks/Mark-SLM-V2-302M:IQ4_NL
- Ollama
How to use miceworks/Mark-SLM-V2-302M with Ollama:
ollama run hf.co/miceworks/Mark-SLM-V2-302M:IQ4_NL
- Unsloth Desktop
- Docker Model Runner
How to use miceworks/Mark-SLM-V2-302M with Docker Model Runner:
docker model run hf.co/miceworks/Mark-SLM-V2-302M:IQ4_NL
- Lemonade
How to use miceworks/Mark-SLM-V2-302M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull miceworks/Mark-SLM-V2-302M:IQ4_NL
Run and chat with the model
lemonade run user.Mark-SLM-V2-302M-IQ4_NL
List all available models
lemonade list
- Atomic Chat
Synchronize README.md with GGUF binary single source of truth
Browse files
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
# Mark-SLM-V2-302M
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
## Forensic Binary Specifications (GGUFReader Verified)
|
| 6 |
|
|
@@ -9,14 +9,15 @@ Architectural base container featuring 16 layers of DeepSeek2 MoE and MLA for sm
|
|
| 9 |
| Architecture | `deepseek2` |
|
| 10 |
| Quantization Type | `IQ4_NL` (4-bit Non-Linear Weights, FP32 Norms/Bias) |
|
| 11 |
| Container File | `mark_slm_v2_302m_iq4_nl.gguf` |
|
| 12 |
-
| File Size | `176.84 MB` |
|
| 13 |
| SHA-256 Checksum | `388237d49ea776c955851e575bb15e30a63b3e8218fda3d23cd690188bbb6b3a` |
|
| 14 |
-
| Total Parameters | `329
|
| 15 |
-
| Active Parameters / Token | `155
|
| 16 |
-
| Total Tensors | `281` (
|
| 17 |
-
|
|
|
|
|
| 18 |
| Transformer Layers | `16` |
|
| 19 |
-
| Attention
|
| 20 |
| Multi-Head Latent Attention (MLA) | `q_lora_rank=384`, `kv_lora_rank=192` |
|
| 21 |
| MoE Routed Experts | `16` |
|
| 22 |
| MoE Shared Experts | `1` |
|
|
@@ -24,25 +25,15 @@ Architectural base container featuring 16 layers of DeepSeek2 MoE and MLA for sm
|
|
| 24 |
| MoE Intermediate Size | `384` |
|
| 25 |
| Context Window | `4096` |
|
| 26 |
| Vocabulary Size | `49152` |
|
| 27 |
-
|
|
| 28 |
|
| 29 |
-
## Quantization
|
| 30 |
|
| 31 |
-
This model is quantized in native non-linear 4-bit (`IQ4_NL`)
|
| 32 |
-
-
|
| 33 |
-
-
|
| 34 |
|
| 35 |
-
##
|
| 36 |
-
|
| 37 |
-
### llama.cpp
|
| 38 |
-
|
| 39 |
-
```bash
|
| 40 |
-
# Run CLI inference
|
| 41 |
-
llama-cli -m mark_slm_v2_302m_iq4_nl.gguf -p "System architecture analysis:" -n 256
|
| 42 |
-
|
| 43 |
-
# Start local OpenAI-compatible server
|
| 44 |
-
llama-server -m mark_slm_v2_302m_iq4_nl.gguf --port 8080 -c 4096
|
| 45 |
-
```
|
| 46 |
|
| 47 |
### Ollama
|
| 48 |
|
|
@@ -51,43 +42,43 @@ Create a `Modelfile` containing:
|
|
| 51 |
```dockerfile
|
| 52 |
FROM ./mark_slm_v2_302m_iq4_nl.gguf
|
| 53 |
|
| 54 |
-
TEMPLATE """<|
|
| 55 |
-
{{ .
|
| 56 |
-
<|
|
| 57 |
-
{{ .Prompt }}<|im_end|>
|
| 58 |
-
<|im_start|>assistant
|
| 59 |
<think>
|
| 60 |
"""
|
| 61 |
|
| 62 |
-
PARAMETER stop "<|
|
| 63 |
-
PARAMETER stop "<|endoftext|>"
|
| 64 |
PARAMETER temperature 0.2
|
| 65 |
PARAMETER top_p 0.95
|
|
|
|
|
|
|
|
|
|
| 66 |
```
|
| 67 |
|
| 68 |
-
|
| 69 |
|
| 70 |
```bash
|
| 71 |
ollama create mark-slm-v2-302m -f Modelfile
|
| 72 |
ollama run mark-slm-v2-302m
|
| 73 |
```
|
| 74 |
|
| 75 |
-
###
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
-
|
| 78 |
-
from llama_cpp import Llama
|
| 79 |
|
| 80 |
-
|
| 81 |
-
model_path="mark_slm_v2_302m_iq4_nl.gguf",
|
| 82 |
-
n_ctx=4096,
|
| 83 |
-
n_threads=8,
|
| 84 |
-
)
|
| 85 |
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
]
|
| 91 |
-
)
|
| 92 |
-
print(response["choices"][0]["message"]["content"])
|
| 93 |
```
|
|
|
|
| 1 |
# Mark-SLM-V2-302M
|
| 2 |
|
| 3 |
+
Compact small language model with an expanded 49,152 token vocabulary and DeepSeek2 MoE/MLA topology.
|
| 4 |
|
| 5 |
## Forensic Binary Specifications (GGUFReader Verified)
|
| 6 |
|
|
|
|
| 9 |
| Architecture | `deepseek2` |
|
| 10 |
| Quantization Type | `IQ4_NL` (4-bit Non-Linear Weights, FP32 Norms/Bias) |
|
| 11 |
| Container File | `mark_slm_v2_302m_iq4_nl.gguf` |
|
| 12 |
+
| File Size | `176.84 MiB (185.43 MB / 185,430,656 bytes)` |
|
| 13 |
| SHA-256 Checksum | `388237d49ea776c955851e575bb15e30a63b3e8218fda3d23cd690188bbb6b3a` |
|
| 14 |
+
| Total Parameters | `329,132,000` physical |
|
| 15 |
+
| Active Parameters / Token | `155,723,744` active |
|
| 16 |
+
| Total Tensors | `281` ({'IQ4_NL': 202, 'F32': 79}) |
|
| 17 |
+
| 1D RMSNorm Precision | `100% FP32` |
|
| 18 |
+
| Hidden Dimension (`hidden_size`) | `768` |
|
| 19 |
| Transformer Layers | `16` |
|
| 20 |
+
| Attention Heads | `12` |
|
| 21 |
| Multi-Head Latent Attention (MLA) | `q_lora_rank=384`, `kv_lora_rank=192` |
|
| 22 |
| MoE Routed Experts | `16` |
|
| 23 |
| MoE Shared Experts | `1` |
|
|
|
|
| 25 |
| MoE Intermediate Size | `384` |
|
| 26 |
| Context Window | `4096` |
|
| 27 |
| Vocabulary Size | `49152` |
|
| 28 |
+
| Weight State | `TRAINED_CHECKPOINT_VALIDATED` |
|
| 29 |
|
| 30 |
+
## Quantization Architecture
|
| 31 |
|
| 32 |
+
This model is quantized in native non-linear 4-bit (`IQ4_NL`):
|
| 33 |
+
- Linear weight matrices and 3D MoE expert tensors are quantized to 4-bit non-linear integer tables with FP16 scale factors per 32 weights.
|
| 34 |
+
- All layer normalization tensors (`*_norm.weight`) and router biases are preserved in full precision `FP32`.
|
| 35 |
|
| 36 |
+
## Local Deployment & Inference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
### Ollama
|
| 39 |
|
|
|
|
| 42 |
```dockerfile
|
| 43 |
FROM ./mark_slm_v2_302m_iq4_nl.gguf
|
| 44 |
|
| 45 |
+
TEMPLATE """{{ if .System }}<|bos|>System: {{ .System }}<|eos|>
|
| 46 |
+
{{ end }}{{ if .Prompt }}<|bos|>User: {{ .Prompt }}<|eos|>
|
| 47 |
+
{{ end }}<|bos|>Assistant:
|
|
|
|
|
|
|
| 48 |
<think>
|
| 49 |
"""
|
| 50 |
|
| 51 |
+
PARAMETER stop "<|eos|>"
|
|
|
|
| 52 |
PARAMETER temperature 0.2
|
| 53 |
PARAMETER top_p 0.95
|
| 54 |
+
PARAMETER repeat_penalty 1.1
|
| 55 |
+
|
| 56 |
+
SYSTEM """You are Mark-SLM-V2-302M, a model built on native DeepSeek2 MoE and MLA architecture."""
|
| 57 |
```
|
| 58 |
|
| 59 |
+
Build and run:
|
| 60 |
|
| 61 |
```bash
|
| 62 |
ollama create mark-slm-v2-302m -f Modelfile
|
| 63 |
ollama run mark-slm-v2-302m
|
| 64 |
```
|
| 65 |
|
| 66 |
+
### llama.cpp
|
| 67 |
+
|
| 68 |
+
```bash
|
| 69 |
+
# Run CLI inference
|
| 70 |
+
llama-cli -m mark_slm_v2_302m_iq4_nl.gguf -p "<|bos|>System: You are an expert system.<|eos|>\n<|bos|>User: Status report?<|eos|>\n<|bos|>Assistant:\n<think>\n" -n 256
|
| 71 |
+
|
| 72 |
+
# Start local OpenAI-compatible server
|
| 73 |
+
llama-server -m mark_slm_v2_302m_iq4_nl.gguf --port 8080 -c 4096
|
| 74 |
+
```
|
| 75 |
|
| 76 |
+
## Artifact Provenance & Verification Manifest
|
|
|
|
| 77 |
|
| 78 |
+
This repository includes an auditable verification manifest: `gguf_verification_manifest.json`.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
+
To audit the binary checksum and vocabulary on your local machine:
|
| 81 |
+
|
| 82 |
+
```bash
|
| 83 |
+
sha256sum mark_slm_v2_302m_iq4_nl.gguf && python3 -c "import gguf; r = gguf.GGUFReader('mark_slm_v2_302m_iq4_nl.gguf'); print('vocab:', r.get_field('deepseek2.vocab_size').parts[-1].tolist()[0])"
|
|
|
|
|
|
|
|
|
|
| 84 |
```
|