English translation (英訳版)
After completing the Emo-style optimizer, a new optimizer was born from various considerations.
※ Of course, schedulers such as cosine are also available (feel free to use them).
QPOLA (Kyupola) optimizer
QPOLARIS (Quantization n Polar-Aligned Resetting Instant SGD)
A self-adaptive SGD designed for strong quantization tolerance, zero history, and spatial coordination (polar coordinates / QJL).
[ Currently at v1.0.4 ] https://github.com/muooon/QPOLA
|Reference LR| LoRA: around 1e-3, FT: around 1e-4, that’s the general feel.
(It works properly with the same LR values you’d use for AdamW — please give it a try.)
※ When training quantized models (int8, etc.), lowering the LR tends to improve stability.
You can confirm the correct behavior of QPOLA v1.0.4. Please check the numerical results of the Anima LoRA generated in the attachment of this article.
● VRAM load ━━► 0 (zero) (no moment buffer required)
● Compute load ━━► Equal or lower
● Scheduler ━━► Not required
paper:
[English] https://huggingface.co/muooon/QPOLA/raw/main/qpola-paper(ENG)260728.txt
It achieves complete moment-free operation while still performing accurate per‑parameter updates.
The mechanism is simply: look at many directions, look at a few directions, then determine the individual direction.
At that point, the per‑parameter LR is computed from the consistency rate, effectively acting as an automatic brake.
(This is executed as a smooth consistency value “1.0 to below 0.01 × user-specified LR”.)
However, this is an experimental optimizer — if it stops working someday, please just laugh it off.
For reference, Anima FT (fine-tuning) for 8 hours has been completed, and 2048px training has been verified.
Naturally, LoRA works fine too. Being able to do this on an RTX 3060 12GB is pretty nice, isn’t it?
It’s a special optimizer, but I’ve designed it to be easy to use, so please give it a try.
Alternative to the First Moment (Direction / Inertia)
■ Traditional First Moment
In conventional optimization, the first moment is defined as follows:
mₜ: Exponential moving average of past gradients (along the time axis)
It represents inertia used to accumulate gradient history over time and estimate the “direction to move now” (trend).
■ QPOLA’s Alternative Approach
QPOLA estimates direction not through time, but through the spatial axis.
micro_direction_mean
macro_direction_mean
These compute the “average gradient direction” that occurs simultaneously within a warp /
within a block, extracting the collective consensus (the wave) of surrounding parameters on “which direction they are trying to move right now.”
By shifting the concept from temporal inertia → spatial simultaneity, these serve as a replacement for the traditional first moment.
Alternative to the Second Moment (Uncertainty / Learning‑Rate Scaling)
■ Traditional Second Moment
The traditional second moment is defined as:
vₜ: Time accumulation of squared (or absolute) gradients
This captures the intensity of past fluctuations (noise magnitude) and enables learning‑rate suppression according to uncertainty (1 ÷ √vₜ).
■ QPOLA’s Alternative Approach
QPOLA uses the following spatial indicators:
warp_p_scale
conflictwarp_p_scale
Through the “spatial mean of parameter absolute values,” these capture the “fundamental scale (dimension)” currently held by each layer/block.
Additionally, conflict (degree of misalignment) measures the “instantaneous noise / uncertainty magnitude,” applying a brake to the learning rate as an adaptation_factor.
This replaces the traditional second moment’s noise‑dependent learning‑rate adjustment with spatial indicators.
日本語(原文) original
Emo 系 optim 完成後、いろいろな考察から、新optimが生まれました
※ もちろん cos などの Scheduler も利用可能です (どうぞご自由に)
QPOLA (キュポラ) optimizer
QPOLARIS (Quantization n Polar-Aligned Resetting Instant SGD)
量子化に強い、履歴ゼロ、空間協調(極座標・QJL)による自己適応型SGD
[ 現在 v1.0.4 です ] https://github.com/muooon/QPOLA
|基準LR| LoRA:1e-3 くらい、FT:1e-4 くらい、かなという感触です
(AdamWと同じLR指定値でちゃんとつかえます、ぜひお試しください)
※ 量子化モデルで(int8など)学習する場合は LR を低くすると安定的と思います
QPOLA v1.0.4 の正常動作をご確認頂けます
この記事の 添付ファイル で Anima LoRA の生成結果(数値)をご覧ください
● VRAM負荷 ━━► 0 (ゼロ) (モーメントバッファ不要)
● 計算負荷 ━━► 同等以下
● スケジューラ ━━► 不要
技術解説:
[日本語] https://huggingface.co/muooon/QPOLA/raw/main/qpola-paper(JPN)260728.txt
完全なモーメントフリー、を成し遂げ、かつ個別 p の正確な更新も行います
仕組みは、多数の方向を見る、少数の方向を見る、個別の方向を決定する、だけ
このとき、個別のLRを整合率から算出します、なので自動ブレーキになります
(これは整合率の滑らかな値「1.0~0.01以下 × ユーザー指定LR」として実行します)
ただこれ 実験的 optim です、もし動かなくなっても笑って済ませてください
一応、Anima で FT(微調整) 8時間学習完了、2048px学習を確認済みです
もちろん LoRA も大丈夫、RTX3060-12GB で、これができる、っていいでしょう?
特殊optimだけど、簡単に使えるように工夫してあるので、ぜひお試しください
1次モーメント(方向・慣性)の代替
■ 伝統的な1次モーメント
従来の最適化では1次モーメントは次のように定義されます。
mₜ:過去の勾配の指数平滑移動平均(時間軸)
時間方向に沿って勾配履歴を蓄積し「いま進むべき方向」(トレンド)を推定するための慣性です。
■ QPOLA の代替アプローチ
QPOLA は方向推定を時間ではなく 空間軸 によって行います。
micro_direction_mean
macro_direction_mean
これらは「ワープ内・ブロック内」で同時に発生した「勾配方向の平均」を取ることで、
周囲の p が "いまどちらへ向かおうとしているか" という集団的コンセンサス(うねり)を抽出します。
従来の 時間的慣性 → 空間的同時性 という発想転換により 1次モーメントの代替 として利用します。
2次モーメント(不確実性・学習率スケール)の代替
■ 伝統的な2次モーメント
従来の2次モーメントは次のように定義されます。
vₜ:勾配の平方(または絶対値)の時間蓄積
これにより過去の変動の激しさ(ノイズの大きさ)
不確実性に応じた学習率の抑制(1 ÷ √vₜ)が実現されます。
■ QPOLA の代替アプローチ
QPOLA では、以下の空間的指標を用います。
warp_p_scale
conflictwarp_p_scale
これらは「パラメータ絶対値の空間平均」によって、
レイヤー/ブロックが現在持つ「基礎的なスケール」(次元)を捉えます。
さらに conflict(アライメントの不一致度) によって、
「いまこの瞬間のノイズ・不確実性の大きさ」を測定し adaptation_factor として学習率にブレーキをかけます。
これは従来の2次モーメントが担っていたノイズに応じた学習率調整を空間的指標で置き換えたものです。

