LilyWinter
commited on
Commit
•
14bdaac
1
Parent(s):
87792cc
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- merge
|
4 |
+
---
|
5 |
+
# BoreanGale-70B
|
6 |
+
|
7 |
+
A merge using a custom algorithm of:
|
8 |
+
- [152334H/miqu-1-70b-sf](https://huggingface.co/152334H/miqu-1-70b-sf)
|
9 |
+
- [Sao10K/WinterGoddess-1.4x-70B-L2](https://huggingface.co/Sao10K/WinterGoddess-1.4x-70B-L2)
|
10 |
+
|
11 |
+
This merge retains most of the weights of Miqu, but when a weight is similar between the two, it is interpolated to the WinterGoddess value. A parameter *t* specifies the sameness threshold. When the distance between two values is below *t*, the weight from WinterGoddess is used.
|
12 |
+
|
13 |
+
This version of the model uses *t* = 0.001. *t* was selected so that very few but some weights are fully switched to WinterGoddess. Model quality rapidly degrades above *t* = 0.0025:
|
14 |
+
|
15 |
+
- *t* = 0.001: This model
|
16 |
+
- *t* = 0.0025: Generates one paragraph okay, but then reverts to garbage
|
17 |
+
- *t* = 0.005: Garbage; semi-related word lists
|
18 |
+
- *t* = 0.01: Garbage; pseudorandom tokens output
|
19 |
+
|
20 |
+
```
|
21 |
+
t: Union[float, np.ndarray],
|
22 |
+
v0: Union[np.ndarray, torch.Tensor],
|
23 |
+
v1: Union[np.ndarray, torch.Tensor],
|
24 |
+
...
|
25 |
+
lweight = numpy.absolute(v0-v1)
|
26 |
+
lweight = t / lweight
|
27 |
+
lweight = numpy.nan_to_num(lweight, nan=1.0, posinf=1.0, neginf=1.0)
|
28 |
+
numpy.clip(lweight, a_min=0.0, a_max=1.0, out=lweight)
|
29 |
+
res = lerp(lweight,v0,v1)
|
30 |
+
```
|