miceworks commited on
Commit
3b02489
·
verified ·
1 Parent(s): 3ec7e51

Synchronize README.md with GGUF binary single source of truth

Browse files
Files changed (1) hide show
  1. README.md +37 -46
README.md CHANGED
@@ -1,6 +1,6 @@
1
  # Mark-SLM-V2-302M
2
 
3
- Architectural base container featuring 16 layers of DeepSeek2 MoE and MLA for small language model exploration.
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.13M` (329,132,000 physical) |
15
- | Active Parameters / Token | `155.72M` (155,723,744 active) |
16
- | Total Tensors | `281` (`202` IQ4_NL, `79` FP32) |
17
- | Hidden Dimension (`dim`) | `768` |
 
18
  | Transformer Layers | `16` |
19
- | Attention Query Heads | `12` |
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
- | Training Status | **Architectural Base / Untrained / Weight Initialization via He/Xavier + Hadamard Fusion (Ready for Pre-training or Fine-Tuning)** |
28
 
29
- ## Quantization Details
30
 
31
- This model is quantized in native non-linear 4-bit (`IQ4_NL`) according to ggml specifications:
32
- - 2D linear weight matrices and 3D MoE expert tensors are packed into 18-byte blocks for each 32 weights (2-byte FP16 scale + 16 bytes mapping to non-linear lookup table `kvalues_iq4nl = [-127, -104, -83, -65, -49, -35, -22, -10, 1, 13, 25, 38, 53, 69, 89, 113]`).
33
- - Normalization weights (`*_norm.weight`) and router bias (`exp_probs_b.bias`) are preserved in full precision `FP32`.
34
 
35
- ## Usage & Deployment
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 """<|im_start|>system
55
- {{ .System }}<|im_end|>
56
- <|im_start|>user
57
- {{ .Prompt }}<|im_end|>
58
- <|im_start|>assistant
59
  <think>
60
  """
61
 
62
- PARAMETER stop "<|im_end|>"
63
- PARAMETER stop "<|endoftext|>"
64
  PARAMETER temperature 0.2
65
  PARAMETER top_p 0.95
 
 
 
66
  ```
67
 
68
- Register and execute:
69
 
70
  ```bash
71
  ollama create mark-slm-v2-302m -f Modelfile
72
  ollama run mark-slm-v2-302m
73
  ```
74
 
75
- ### Python (llama-cpp-python)
 
 
 
 
 
 
 
 
76
 
77
- ```python
78
- from llama_cpp import Llama
79
 
80
- llm = Llama(
81
- model_path="mark_slm_v2_302m_iq4_nl.gguf",
82
- n_ctx=4096,
83
- n_threads=8,
84
- )
85
 
86
- response = llm.create_chat_completion(
87
- messages=[
88
- {"role": "system", "content": "You are a concise software engineering assistant."},
89
- {"role": "user", "content": "Explain lock-free atomic CAS loops."},
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
  ```