Update README.md
Browse files
README.md
CHANGED
@@ -12,47 +12,41 @@ library_name: transformers
|
|
12 |
|
13 |
## Model Description
|
14 |
|
15 |
-
Model created by analyzing and selecting optimal layers based on dimensional utilization efficiency
|
16 |
-
|
17 |
-
|
18 |
-
-
|
19 |
-
-
|
20 |
-
-
|
21 |
-
|
22 |
-
|
23 |
-
-
|
24 |
-
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
-
|
44 |
-
-
|
45 |
-
|
46 |
-
|
47 |
-
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
-
|
52 |
-
-
|
53 |
-
where n is the number of singular values
|
54 |
-
|
55 |
-
4. **Normalization**
|
56 |
-
- Final NER score = H/H_max
|
57 |
-
- Results in value between 0 and 1
|
58 |
-
- Higher scores indicate more uniform dimensional utilization
|
|
|
12 |
|
13 |
## Model Description
|
14 |
|
15 |
+
Model created by analyzing and selecting the optimal layers from other Qwen2.5-7B models based on their dimensional utilization efficiency, measured by the Normalized Effective Rank (NER). Computed like:
|
16 |
+
|
17 |
+
Singular Value Decomposition:
|
18 |
+
- Input: Weight matrix A ∈ R^(m×n) # m = number of output features, n = number of input features
|
19 |
+
- Compute singular values σᵢ where σᵢ ≥ 0 # σᵢ represents the importance of each dimension
|
20 |
+
- Filter values above numerical threshold (>1e-12) # removes numerical noise from computation
|
21 |
+
|
22 |
+
Distribution Normalization:
|
23 |
+
- Sum all singular values: S = Σσᵢ # S acts as normalization factor
|
24 |
+
- Create probability distribution: pᵢ = σᵢ/S # converts singular values to probabilities summing to 1
|
25 |
+
|
26 |
+
Entropy Calculation:
|
27 |
+
- Compute Shannon entropy: H = -Σ(pᵢ * log₂(pᵢ)) # measures information content of distribution
|
28 |
+
- Calculate maximum possible entropy: H_max = log₂(n) # n = number of singular values
|
29 |
+
where n is the number of singular values # maximum entropy occurs when all dimensions contribute equally
|
30 |
+
|
31 |
+
Normalization:
|
32 |
+
- Final NER score = H/H_max # normalizes score to [0,1] range
|
33 |
+
- Results in value between 0 and 1 # 0 = single dimension dominance, 1 = perfect dimensional utilization
|
34 |
+
- Higher scores indicate more uniform dimensional utilization
|
35 |
+
|
36 |
+
## Creating Composite Model
|
37 |
+
|
38 |
+
Layer Analysis:
|
39 |
+
- Download base and fine-tuned models from Hugging Face Hub # fetches models using Hugging Face API
|
40 |
+
- Calculate Normalized Effective Rank (NER) for each layer within each model # process each independently
|
41 |
+
|
42 |
+
Layer Selection:
|
43 |
+
- Identify common layer structures across models
|
44 |
+
- Define model and layer name pairs that have highest NER for each layer based on their NER scores
|
45 |
+
|
46 |
+
Model Composition:
|
47 |
+
- Incrementally build a composite model using layer with highest NER from model pool.
|
48 |
+
|
49 |
+
Output Generation:
|
50 |
+
- Save merge reports documenting layer sources
|
51 |
+
- Copy config and tokenizer files from base model
|
52 |
+
- Save the composite model with complete weights # model ready to use
|
|
|
|
|
|
|
|
|
|
|
|