Add files via upload

pull/299/head
hako-mikan 2023-11-13 23:14:35 +09:00 committed by GitHub
parent 511dc04620
commit d4610aaac5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 27 deletions

View File

@ -177,26 +177,27 @@ _Note also compared with either the Median/Guassin filters individually how you
## <a id="extract">Extracting (Dis)Similar Features from Differential Models</a>
### _Available modes :_ Add difference
This method is designed to extract **either similar or dissimilar features** from two differential models that are built upon a common base model.
This method is designed to extract **either similar or dissimilar features** from *two differential models* that are built upon a common base model.
### Using Three Models
In this configuration, we use a base model (**Model A**) along with two derived models (**Model B** and **Model C**), both developed from **Model A**. The differential models in focus are "**Model B - Model A**" and "**Model C - Model A**". Both derivatives share **Model A** as their common ancestor, ideally the most recent one, to reduce false similarities.
### Using Three Full-Parameter Models
In this setup, we use a base model (**Model A**) along with two derived models (**Model B** and **Model C**), both developed from **Model A**. *The two differential models* in focus are "**Model B - Model A**" and "**Model C - Model A**". Both derivatives share **Model A** as their common ancestor, ideally the most recent one, to reduce false similarities.
### <a id="extractlora">Using Two Differential Models(extract from two LoRAs)</a>
The extraction of common and distinct characteristics of two LoRAs will be carried out. This process is based on the assumption that the LoRAs are trained on a shared foundational model. However, the results may be unpredictable when applying this method to LoRAs that have been trained from different sources.
### <a id="extractlora">Using Two LoRA Networks</a>
In this setup, we directly use *the two differential models*: **LoRA B** and **LoRA C**. Both models are assumed to be trained on a common base model, similar to **Model A** in the three-model setup. However, if **LoRA B** and **LoRA C** derive from different base models, the results may be unpredictable due to underlying model discrepancies.
### Key Parameters
- **alpha (α)**: Controls the focus of feature extraction between **Model B** (**α = 0**) and **Model C** (**α = 1**).
- **beta (β)**: Controls the nature of feature extraction, with **β = 0** for **similar features** and **β = 1** for **dissimilar features**.
- **smoothness(Option value)**: Adjusts cosine similarity rectification, typically around **0.3**.
- **alpha (*α*)**: Controls the focus of feature extraction between **Model (LoRA)B** (***α* = 0**) and **Model (LoRA)C** (***α* = 1**).
- **beta (*β*)**: Controls the nature of feature extraction, with ***β* = 0** for **similar features** and ***β* = 1** for **dissimilar features**.
- **gamma (*γ*)**: Adjusts the selectivity in identifying feature (dis)similarity. **High *γ* (e.g., *γ* = 10)** emphasizes recognizing *more similar* features as similar. Conversely, **low *γ* (e.g., *γ* = 0.1)** emphasizes recognizing *more dissimilar* features as dissimilar.
### Usage Scenarios
- **α = 0, β = 0**: Extracts features in **Model B** that are similar to those in **Model C**.
- **α = 0, β = 0.5**: Represents a balanced extraction between similarity and dissimilarity for features from:
- ***α* = 0, *β* = 0**: Extracts features in **Model B** that are similar to those in **Model C**.
- ***α* = 0, *β* = 0.5**: Represents a balanced extraction between similarity and dissimilarity for features from:
- **Full-parameter models**: $\frac{\text{A} + \text{lerp}(\text{B}, \text{C}, \alpha)}{2}$
- **LoRA networks**: $\frac{\text{lerp}(\text{B}, \text{C}, \alpha)}{2}$
- **α = 0, β = 1**: Extracts features in **Model B** that are dissimilar to those in **Model C**.
- **α = 1**: Reverses the focus between **Models B and C**.
- ***α* = 0, *β* = 1**: Extracts features in **Model B** that are dissimilar to those in **Model C**.
- ***α* = 1**: Reverses the focus between **Model B** and **Model C**.
## tensor
### Available modes : weight sum only

View File

@ -178,27 +178,28 @@ _特に、Median/Gaussianフィルタを個別に使用した場合と比較し
>これらのケースでは、smooth Addで1よりも個別の影響が小さいため、Alphaを2まで上げることができます。しかし、これはもちろん望む結果に依存します。
## <a id="extract">差分モデルからの類似・非類似特徴の抽出</a>
### _使用可能なモード:_ 差異の追加
この方法は、共通の基本モデルに基づいて学習された二つの差分モデルから**類似または非類似の特徴を抽出する**ために設計されています。
### _Available modes :_ Add difference
この方法は、共通の基本モデルに基づいて構築された*2つの差分モデル*から、**類似または非類似の特徴**を抽出するために設計されています。
### 三つのモデルの使用
この構成では、基本モデル**モデルA**)と、**モデルA**で学習された二つの派生モデル(**モデルB**と**モデルC**)を使用します。焦点となる差分モデルは「**モデルB - モデルA**」と「**モデルC - モデルA**」です。派生モデルは**モデルA**を共通の学習元を持つことが望ましいのですが、異なるモデルでも動作します。
### 3つのフルパラメーターモデルを使用する構成
この構成では、基本モデル (**モデルA**) と、**モデルA**から派生した2つのモデル (**モデルB**と**モデルC**) を使用します。関連する*2つの差分モデル*は、「**モデルB - モデルA**」と「**モデルC - モデルA**」です。偽の類似性を減らすために、**モデルA**は、2つの派生モデルの*最新の共通祖先*となっていることが望ましいです。
### <a id="extractlora">ふたつのLoRAから抽出する場合(extract from two LoRAs)</a>
ふたつのLoRAの共通点・非共通点を抽出します。共通するモデルで学習されたLoRAを想定していますが、異なる学習元のLoRAでも動作するものの結果は未知数です。
### <a id="extractlora">2つのLoRAネットワークを使用する構成</a>
この構成では、*2つの差分モデル*として、**LoRA-B**と**LoRA-C**を直接使用します。これらのモデルは、3モデル構成の**モデルA**と同様に、共通の基本モデルに基づいて学習されていると仮定されます。もし、**LoRA-B**と**LoRA-C**が異なる基本モデルから派生している場合、基本モデルの相違により結果が予測不可能になる可能性があります。
### 主要パラメータ
- **α**: 特徴抽出の焦点を**モデルB****α = 0**)と**モデルC****α = 1**)の間で制御します。
- **β**: 特徴抽出の性質を制御し、**β = 0** は**類似特徴**、**β = 1** は**非類似特徴**のためです。
- **smoothness(option value)**: 通常は**0.3**周辺で、コサイン類似性の矯正を調整します。
- **alpha (*α*)**: **モデル(LoRA)B** (***α* = 0**) と**モデル(LoRA)C** (***α* = 1**) の間で特徴抽出の焦点を制御します。
- **beta (*β*)**: 特徴抽出の性質を制御し、***β* = 0**では**類似特徴抽出**、***β* = 1**では**非類似特徴抽出**を意味します。
- **gamma (*γ*)**: 特徴の類似性・非類似性の判定の程度を調整します。**高い*γ* (例えば、*γ* = 10)** は、*より類似した*特徴のみを類似として認識します。逆に、**低い*γ* (例えば、*γ* = 0.1)** は、*より非類似した*特徴のみを非類似として認識します。
### 使用シナリオ
- **α = 0, β = 0**: **モデルC**に似ている**モデルB**の特徴を抽出します。
- **α = 0, β = 0.5**: 類似性と非類似性の特徴に関して、以下の間のバランスの取れた抽出を表します:
- **フルパラメータモデル**: $\frac{\text{A} + \text{lerp}(\text{B}, \text{C}, \alpha)}{2}$
- **LoRAネットワーク**: $\frac{\text{lerp}(\text{B}, \text{C}, \alpha)}{2}$
- **α = 0, β = 1**: **モデルC**と異なる**モデルB**の特徴を抽出します。
- **α = 1**: **モデルBとC**の間の焦点を逆転します。
- ***α* = 0, *β* = 0**: **モデルB**の特徴から**モデルC**の特徴と類似しているものを抽出します。
- ***α* = 0, *β* = 0.5**: 両者の中間に位置するため、類似特徴抽出でも非類似特徴抽出でもなく、下記の式によって表される単純な結果になります。
- **フルパラメーターモデルの場合**: $\frac{\text{A} + \text{lerp}(\text{B}, \text{C}, \alpha)}{2}$
- **LoRAネットワークの場合**: $\frac{\text{lerp}(\text{B}, \text{C}, \alpha)}{2}$
- ***α* = 0, *β* = 1**: **モデルB**の特徴から**モデルC**の特徴と非類似しているものを抽出します。
- ***α* = 1**: 上記例での**モデルB**と**モデルC**の役目を逆転させます。
## tensor
### Available modes : weight sum only