Этот сайт использует файлы cookies. Продолжая просмотр страниц сайта, вы соглашаетесь с использованием файлов cookies. Если вам нужна дополнительная информация, пожалуйста, посетите страницу Политика файлов Cookie
Subscribe
Прямой эфир
Cryptocurrencies: 8166 / Markets: 114434
Market Cap: $ 2 766 072 159 155 / 24h Vol: $ 117 489 825 481 / BTC Dominance: 58.763434733426%

Н Новости

Трансформер своими руками: с нуля до Numpy реализации и обучения

80126cc32af1f08d561e6a9f07d41e6d.png

В этой статье пойдет речь об одной из самых сложных и интересных архитектур — трансформере, лежащей в основе современных моделей от OpenAI и Google DeepMind. И это не научпоп для обывателя с наивным уровнем объяснения, а полноценный учебный материал, который поможет вам понять работу трансформера на фундаментальном уровне без черных ящиков типа TensorFlow и Pytorch.

А для того чтобы лучше вникнуть, давайте напишем настоящий мини-трансформер на процедурном Python и обучим его!

Коротко об авторе

Я энтузиаст-исследователь, который интересуется узкоспециализированными вещами, чтобы рассказать о них понятным языком другим людям.

Почему я вообще говорю о трансформере?

Мною был написан полноценный мини-фреймворк, который представляет из себя энкодер-декодерный трансформер со своей реализацией объекта Тензор, топологическим автоградом и динамическим графом вычислений. А также множеством слоев, функций и гибкими настройками параметров.

Он является моей исследовательской платформой для практической проверки перспективных и интересных технологий, например Латентного внимания. И именно на его основе, я создал этот упрощенный учебный код.

В будущем я планирую выложить его в открытый доступ и написать большую статью-инструкцию о его устройстве, эволюции и проблемах, решенных на этом пути.
Но пока это лишь планы.

Данный материал можно изучать в разных режимах:

  1. Как объяснение архитектуры для общего представления;

  2. Как полноценный гайд с чтением кода и самостоятельной практикой;

  3. Как основу для собственных экспериментов.

Вы сами можете выбрать тот режим, который нужен для ваших целей на данный момент. Статья написана циклично, от поверхностного разбора до конкретной реализации. Однако сразу оговорюсь, что для максимальной пользы, читателю нужен базовый минимум:

  • Иметь представление о работе нейросетей;
    Линейные слои; активация; веса; ошибка и подобное.

  • Желателен опыт с языковыми моделями;
    Векторное представление текста; Сверточные или рекуррентные сети.

  • Понимать работу СГС метода;
    Градиент; Граф вычислений; Прямой и обратный проход.

  • Знать линейную алгебру на начальном уровне;
    Линейный оператор; Матричное представление нейросетей.

  • Немного программировать.
    Python: функции, условия и циклы; Numpy: работа с массивами; Среда: PyCharm, Colab или что-то еще.

  • Желание разобраться в сложной теме.
    Действительно ли вам это нужно?

То есть если вы немного знаете линейку, немного программируйте и знакомы с нейросетями на уровне bootcamp-адепта, то этого уже должно хватить для погружения на уровне реализации. А даже если и нет, то вы все равно можете прочитать статью для общего ознакомления.

В отличии от других архитектур, траснформеры проблематичны именно в понимании. Для их изучения просто необходимы аналогии и примеры. Что-то может показаться очевидным, а что-то непонятным. Поэтому важно просто двигаться дальше, к более подробному рассмотрению всех моментов, и понимание придет само.

Для тех, кто все же хочет освоить код, скажу следующее:

Наш трансформер будет довольно простым: со статическим графом и одноблочными энкодером и декодером. Сам код написан в парадигме процедурного программирования (за исключением некоторых модулей) и может быть прочитан на любом уровне и без знания ООП. И все же это будет полноценный обучаемый трансформер с мультиголовым вниманием, батчами данных, параллельным вычислением и множеством параметров.

Код будет содержаться в спойлерах в конце глав. Для этого откройте редактор кода или ноутбук. Разверните раздел "практика", скопируйте его и запустите в своей среде. Шаг за шагом, глава за главой, модель будет прирастать кодом, пока мы не запустим ее в отдельном разделе "Запуск модели".

Для закрепления материала, выполните домашнее задание, которое ждет вас в конце статьи.

Практика

На текущем этапе мы просто создадим универсальный импорт, который будет работать независимо от того, имеется ли у вас (или на удаленной машине) GPU.

try:
    !nvidia-smi
    !pip install cupy-cuda12x
    import cupy as np
    if not np.cuda.runtime.getDeviceCount():
        raise ImportError
    print("Using GPU")
except:
    import numpy as np
    print("Using CPU")

import random
from typing import Union, Optional

Для вычислений на GPU вам понадобится библиотека CuPy, которая является полным аналогом NumPy и почти идентична ему в плане интерфейса.
И, разумеется, нужно установить CUDA Toolkit аналогичной версии, если его нет.

# Пример установки библиотеки для нужной версии CUDA:
pip install cupy-cuda12x
О понятиях

Обратите внимание!

В тексте я буду использовать скобки для представления размера тензоров. Например [B, H, T, D]. Они нужны для понимания метаморфоз, происходящих с тензорами во время многочисленных умножений, транспонирований, решейпов и подобного.

Нужно запомнить следующие условные обозначения:

  • B (Batch) — размер батча;

  • H (Head) — количество голов внимания;

  • T (Token) — количество токенов в последовательности;

  • D (D_model) — ширина модели (длина эмбеддингов токенов);

  • P (Part) — размер партии для каждой головы внимания;

  • V (Vocab) — размер вокабуляра модели;

  • MHA (Multi-head attention) — мультиголовое внимание;

  • MHCA (Multi-head cross-attention) — перекрестное внимание;

  • FF (Feedforward) — прямой проход;

Вокабуляр — это словарный запас модели, где текстовые единицы представлены в сыром виде под номерами. Его ширина V — это крайне важная характеристика, от которой зависят размеры некоторых обучаемых параметров.

Токены — это представления текстовых единиц в виде номера. Они используются в датасетах для укрупнения информации. Посредством токена можно индексировать вокабуляр.

Эмбеддинги — это векторные представления текстовых единиц, которые непосредственно работают в модели.

Тензоры — это пакеты данных с возможностью параллельной обработки. Их размерности и конкретные размеры, а так же порядок осей напрямую влияют на их обработку моделью: операции, оси суммирования, интерпретация. В данном коде они будут представлены numpy-массивами.

Курсивом будут обозначены примечания к тексту. Они должны ответить на возможные вопросы заранее.

Ну и в конце, без ложной скромности, скажу, что написать подобную статью — это тяжелый труд, который никто не оплатит. Я старался создать исчерпывающий материал, который мог бы использоваться как самостоятельное учебное пособие. У меня ушло 4 месяца на изучение темы и написание собственного фреймворка и еще несколько недель на написание этой статьи. Буду рад вашей поддержке!

Карта изучения

Ниже изображена всем известная схема трансформера. Давайте глобально пройдемся по ней для общего представления. На этом этапе мы не будем углубляться в детали: он нужен лишь как оглавление к статье.

Схема трансформера (рис1)
Схема трансформера (рис1)

Коротко разберем алгоритм работы:

Все начинается с того, как данные (сообщение пользователя, запрос поисковика, обучающий батч) попадают в начало энкодера (которого может и не быть) для извлечения контекста запроса.
Сообщение имеет форму [B T], где B - это размер батча, а T - количество токенов в сообщениях.

Они все еще представлены в сыром виде и прежде чем идти дальше, слой Get_embedding должен подменить номера позиций токенов в вокабуляре их векторными представлениями, которые обучены заранее или будут обучены (дообучены) вместе с трансформером.
Данные, обзаведенные эмбеддингами, теперь имеют форму [B T D], где D - это длина эмбеддингов, например 512.

После мы должны зашифровать информацию о позициях токенов в сообщении, так как трансформеры обрабатывают их в параллельном режиме. Подробнее об этом мы поговорим в разделе "Позиционное кодирование".

Схема энкодера (рис2)
Схема энкодера (рис2)

В энкодере нас ждут слои мультивнимания и прямого прохода со слоем активации, которые представляют из себя единый блок. Блоки могут повторяться. Чем больше блоков, тем больше параметров у трансформера, тем больше признаков он может запомнить и тем более сложные паттерны извлечь.

Обратите внимание, что в блоках имеются остаточные связи (Residual), которые минуют слои и складываются с их выходами в конце. Этот момент мы разберем в отдельной главе "Стабилизация".

При этом форма данных будет меняться: разбиваться на части для анализа мультиголового внимания [B H T P] и снова собираться в [B T D] перед подачей в Feedforward.

Обработав данные, энкодер возвращает некое абстрактное представление информации из сообщения, которую он смог извлечь, называемое контекстом. Его принято обозначать буквой Z. Эта итоговая "выжимка" из полученного запроса будет использоваться для последующей генерации ответа.
Она все так же имеет стандартную форму [B T D] и будет нужна в декодере.

Схема декодер (рис3)
Схема декодер (рис3)

Декодер не взаимодействует напрямую с данными энкодера. Вместо этого он начинает генерировать свое собственное сообщение по одному токену, начиная с технического Start.

Для этого создается стартовое сообщение с токеном Start для каждого набора в батче.
Форма на этом этапе — [B 1].

Как и в энкодере, генерируемый батч должен получить эмбеддинги и пройти позиционное кодирование. Этот этап происходит при каждой итерации.

После этого батч проходит связку:

  • Маскированного мультивнимания, которое ко всему прочему запрещает токенам видеть те, что стоят пред ними в последовательностях;

  • Перекрёстного внимания, которое связывает информацию из генерируемого сообщения и контекста, пришедшего из энкодера (Новое сообщение как бы строится на основе запроса пользователя.);

  • Прямого прохода, который завершает блок, как и в энкодере.

После прохождения блока(ов) декодера, данные поступают в выходной слой, который проецирует их в пространство с размерностью равной длине словаря [B T V], где V - размер вокабуляра. Таким образом мы получаем логиты нужной формы.

Полученные логиты проходят через Softmax (он еще не раз нам встретится), чтобы их можно было интерпретировать как вероятности. Позиция с самым высоким значением соответствует наиболее вероятному кандидату на следующий токен.

Мы присоединяем номер токена к генерируемому сообщению [B T+1] и снова отправляем его на вход декодера, где процесс повторяется: получение эмбеддингов, кодирование и блоки. Это продолжается пока цикл генерации не создаст максимальное количество токенов или, что наиболее вероятно, все сообщения в батче не получат токен остановки Stop.

Когда это произойдет, генерация оборвется раньше времени. До тех пор, последовательности, которые получили Stop раньше других, будут заполнятся паддингами — это еще один вид технических токенов, нужных для работы сети.


Все это короткое описание работы трансформера, которое может быть слишком нагроможденным и непонятным. Это нормально. Далее мы разберем его составные части и их работу очень подробно.

Должно быть вы уже слышали, что основная идея трансформеров заключается в самовнимании токенов? Начнем с него.

Практика

Давайте реализуем прямой проход модели.

Это верхнеуровневая функция последовательного вызова слоев. Она словно скелет модели проводит входные данные через энкодер и декодер, автоматически определяет режим работы (генерация или обучение) и кэширует промежуточные состояния тензоров для обратного прохода.

def call(X: np.ndarray, Y: np.ndarray = None) -> np.ndarray:
    """Проход по блокам"""
    # Энкодер:
    training = True if Y is not None else False
    X = np.take(vocab, X, axis=0)                   # Получение эмбеддингов (B, T, D)
    Xr = positional_encoding(X)                      # Позиционный энкодинг

    X, cache_Norm1 = normalize(Xr)
    X, cache_MHAe = MHA(X, index=0)
    Xr = Xr + X
    X, cache_Norm2 = normalize(Xr)
    X, cache_FFe = FF(X, index=0)
    Z = Xr + X

    # Декодер:
    if training:                                    # Режим обучения
        X = add_start_token(Y)                      # Присоединение стартового набора (B, 1+T)
        X = np.take(
            vocab,
            X,
            axis=0
        ).astype(np.float32)                         # Получение эмбеддингов (B, 1+T, D)
        Xr = positional_encoding(X)                  # Позиционное кодирование

        X, cache_Norm3 = normalize(Xr)
        X, cache_MHAd = MHA(X, index=1, is_decoder=True)
        Xr = Xr + X
        X, cache_Norm4 = normalize(Xr)
        X, cache_MHCA = MHCA(X, Z)
        Xr = Xr + X
        X, cache_Norm5 = normalize(Xr)
        X, cache_FFd = FF(X, index=1)
        Xr = Xr + X
        X, cache_Norm6 = normalize(Xr)
        X, cache_out = output(X)
        cache = {
            "Norm1": cache_Norm1, "MHA-E": cache_MHAe,
            "Norm2": cache_Norm2, "FF-E": cache_FFe,
            "Norm3": cache_Norm3, "MHA-D": cache_MHAd,
            "Norm4": cache_Norm4, "MHCA": cache_MHCA,
            "Norm5": cache_Norm5, "FF-D": cache_FFd,
            "Norm6": cache_Norm6, "Out": cache_out
        }
        return X, cache
    else:                                          # Режим генерации
        seq = np.tile(
            Start, (Z.shape[0], 1)
        ).astype(np.int32)                         # Стартовый набор (B, 1)
        for _ in range(max_tokens):                # Цикл токенов
            X = np.take(vocab, seq, axis=0)        # Получение эмбеддингов (B, 1, D)
            Xr = positional_encoding(X)            # Позиционное кодирование

            X, _ = normalize(Xr)
            X, _ = MHA(X, index=1, is_decoder=True)
            Xr = Xr + X
            X, _ = normalize(Xr)
            X, _ = MHCA(X, Z)
            Xr = Xr + X
            X, _ = normalize(Xr)
            X, _ = FF(X, index=1)
            X = Xr + X
            X, _ = output(X)

            X = softmax(X)                         # Вероятности

            indexes = np.argmax(
                X[:, -1, :], axis=-1
                )[..., None]                       # Получение индексов новых токенов
            seq = np.concatenate(
                (seq, indexes)
                , axis=1
            )                                      # Добавление токенов
        return seq

Код реализует изображенную выше схему.

Кроме того, нам понадобятся вспомогательные функции, использующиеся в слоях и не только:

def softmax(X: np.ndarray) -> np.ndarray:
    """Softmax по последней оси"""
    shifted = X - np.max(X, axis=-1, keepdims=True)
    exp = np.exp(shifted)
    return exp / np.sum(exp, axis=-1, keepdims=True)


def leakyrelu(X: np.ndarray, rate: float = .1) -> np.ndarray:
    """Leaky ReLU"""
    return np.where(X > 0, X, rate * X).astype(np.float32)


def add_start_token(data: np.ndarray) -> np.ndarray:
    """Присоединение стартового токена в начало последовательности"""
    size = (data.shape[0], 1)
    start = np.tile(Start, size).astype(np.int32)  # Стартовый токен (B, 1)
    return np.concatenate((start, data), axis=1)   # Стартовый набор (B, 1+T)


def add_finish_token(data: np.ndarray) -> np.ndarray:
    """Присоединение финишного токена в конец последовательности"""
    size = (data.shape[0], 1)
    finish = np.tile(Finish, size).astype(np.int32)  # Финишный токен (B, 1)
    return np.concatenate((data, finish), axis=1)    # Финишный набор (B, T+1)

def predict(data: np.ndarray, dtype=np.int32) -> np.ndarray:
    """Выдает предсказание для данных"""
    predictions = []
    for batch in data:
        predictions.append(call(batch))
    return np.array(predictions, dtype=dtype)

Их изучение не принципиально.

Общее представление о работе самовнимания

В обычных языковых моделях, мы представляли данные в виде n-грамм, присваивали им эмбеддинги - векторные представления текста, и отправляли их, например, в сверточную сеть для извлечения признаков.

Пример работы с текстом (рис6)
Пример работы с текстом (рис6)


Тогда данные начинали сжиматься в пространственном измерении и расти в канальном, пока на выходе не получалась "выжимка" из признаков, которую можно было развернуть в новую последовательность или вытянуть/усреднить/максимизировать и направить в полносвязный слой.

Или в рекуррентную сеть...

Пример работы с текстом (рис7)
Пример работы с текстом (рис7)

Тогда данные по одному токену (эмбеддингу токена) отправлялись в рекуррентные слои, которые подавали свой выход обратно на вход (рекуррентно) вместе со следующим токеном.

На самом деле все сложнее. Поступающая в нейрон/слой информация обновляет скрытое состояния с отдельными обучаемыми параметрами и только потом к ней применяются основные параметры. Таким образом каждый поступающий эмбеддинг будет сталкиваться с информацией (памятью) предыдущих и работать в локальном контексте.

Далее выход(ы) сети можно подать в классификатор или декодер, который на его основе начнет генерацию последовательности.

В трансформерах все иначе!

Идея заключается в том, чтобы создать матрицу отношений между языковыми единицами и прояснить сложные взаимосвязи между ними. Ее можно представить в виде таблицы, где у каждой такой единицы будет целая строка со значениями, соответствующими другим токенам, размера TxT.

Предположим, у нас есть некий текст, который мы подаем в сеть: "Я иду в магазин.". Тогда на выходе получится подобная матрица внимания:

T1 Я

T2 Иду

T3 В

T4 Магазин

Я

.5

.4

.05

.25

Иду

.2

.5

.05

.25

В

0

.15

.7

.15

Магазин

.2

.2

.1

.5

Здесь каждый токен имеет представление о любом другом, выраженное в конкретных цифрах. Это и называется самовниманием токенов.
В нашем синтетическом примере, подлежащие и сказуемое имеют сильную связь, когда как предлог несет меньше смысловой нагрузки и слабо связан с другими токенами.

Но как реализовать подобное на практике?

На ум приходит простой алгоритм, дающий нужную форму. Если умножить X на его транспонированный вариант, то как раз получится тензор [B T T], то есть таблица отношений для каждого набора в батче.

A [B T T] = X [B T D] * Xt [B D T]

Но получение нужной формы не означает получение нужной сути. Да и как мы будем учить нашу модель, если у нее нет обучаемых параметров? Вот почему нам нужны не сырые данные, а их проекции.

Ниже представлена полная схема работы внимания:

Схема работы механизма самовнимания (рис8)
Схема работы механизма самовнимания (рис8)

Не так уж и много действий, не правда ли?

Проекция (рис9)
Проекция (рис9)

Вместо единого представления данных и последовательного взаимодействия с обучаемыми матрицами весов, мы создаем целых три проекции, которые будут взаимодействовать друг с другом. Делается это путем умножения на три обучаемые матрицы:

Матрица запросов Q;

Матрица ключей K;

Матрица значений V.

На самом деле, подобные названия — это лишь абстракция, которая облегчает понимание происходящего.

Теперь, входные данные предстают в трех ипостасях:

  • Xq - запросы токенов. Этакое "Что я ищу?".

  • Xk - ключи. Представления являющиеся ключами к нашему "замку" — запросу.

  • Xv - значения. Внутреннее содержание токенов.

Формула самовнимания (рис10)
Формула самовнимания (рис10)

И только после этого нужно перемножить две такие проекции, чтобы получить матрицу нужной формы. Каждый токен как бы "опрашивает" другой, насколько тот для него семантически важен. Таким образом и создается матрица внимания, где любой токен имеет представление о другом в конкретной последовательности. Нужно лишь пропустить ее через Softmax для нормирования значений и представления их как вероятностей.

Сырые значения становятся вероятностными распределениями, которые в сумме равны 1.

Так что в итоге это дает и как привести данные обратно к стандартной форме?

Взвешенные значения (рис11)
Взвешенные значения (рис11)

После создания матрицы внимания, мы отвечаем на самый главный вопрос о важности токенов друг для друга. Это значит, что если мы умножим такую матрицу на проекцию значений, мы получим итоговое (взвешенное) представление данных о самих себе: что в них важно, а что второстепенно по смыслу; какие части являются ключевыми, а какие можно отбросить; как токены связаны друг с другом. Все это инкорпорировано в итоговый Z тензор.

Кроме того, в техническом смысле, мы возвращаем данные к стандартной форме, которая необходима для работы в других слоях:

Z [B T D] = A [B T T] * Xv [B T D]

Обратите внимание, что перед нормированием и взвешиванием, мы упустили еще одно важно действие — масштабирование. Прежде чем подать логиты в Softmax, нужно разделить их на корень длины эмбеддинга/партии. Этот момент мы подробно разберем в главе "Стабилизация".

На этом моменте, суть алгоритма классического самовнимания раскрыта полностью. Но это еще не все, что нужно знать для полноценной реализации слоя внимания трансформеров.

Практика

Давайте создадим наши обучаемые матрицы (тензоры).

Для этого зададим глобальные параметры, которые будут иметь решающее значение для работы модели.

# Глобальные параметры:
batch = 64
std = .1
heads = 4
d_model = 32
part_size = int(d_model / heads)
ff_multiply = 4
vocab_size = 12                   # Включая токены Start и Finish
max_tokens = 16

Дефолтный размер входных данных у нас будет не очень большой [64, 16] — 64 примера по 16 токенов. Длинна эмбеддингов = 32. Этого хватит для обучения последовательностей. В будущем параметры можно изменить, но эти значения станут отправной точкой (потому что они работают).

# Параметры внимания (для энкодера и декодера):
size1 = (2, heads, part_size, part_size)
size2 = (2, d_model, d_model)
MWQ = np.random.normal(size=size1, scale=std).astype(np.float32)
MWK = np.random.normal(size=size1, scale=std).astype(np.float32)
MWV = np.random.normal(size=size1, scale=std).astype(np.float32)
MWO = np.random.normal(size=size2, scale=std).astype(np.float32)

# Параметры перекрестного внимания:
size1 = (heads, part_size, part_size)
size2 = (d_model, d_model)
CWQ = np.random.normal(size=size1, scale=std).astype(np.float32)
CWK = np.random.normal(size=size1, scale=std).astype(np.float32)
CWV = np.random.normal(size=size1, scale=std).astype(np.float32)
CWO = np.random.normal(size=size2, scale=std).astype(np.float32)

# Параметры прямого прохода:
size1 = (2, d_model, d_model * ff_multiply)
size2 = (2, d_model * ff_multiply, d_model)
size3 = (2, d_model * ff_multiply)
size4 = (2, d_model)
FW1 = np.random.normal(size=size1, scale=std).astype(np.float32)
FW2 = np.random.normal(size=size2, scale=std).astype(np.float32)
FB1 = np.zeros(size3).astype(np.float32)
FB2 = np.zeros(size4).astype(np.float32)

# Параметры выходного слоя:
size1 = (d_model, vocab_size)
size2 = (vocab_size)
WO = np.random.normal(size=size1, scale=std).astype(np.float32)
BO = np.zeros(size2).astype(np.float32)

# Обучаемые параметры (для оптимизатора):
parameters = [
    MWQ[0], MWK[0], MWV[0], MWO[0],
    FW1[0], FB1[0], FW2[0], FB2[0],
    MWQ[1], MWK[1], MWV[1], MWO[1],
    CWQ, CWK, CWV, CWO,
    FW1[1], FB1[1], FW2[1], FB2[1],
    WO, BO,
]

Стоит сказать, что во "взрослых" фреймворках используются продвинутые методы инициализации начальных параметров, которые учитывают размеры матриц и распределение. Это нужно для предотвращения быстрого роста значений при многократном умножении больших матриц и, как следствие, переполнение выделенной памяти для используемых типов. А использовать принято Float32, так как он значительно легче, менее затратен при вычислениях и его точности достаточно для машинного обучения.
Но все это
большая тема для отдельной статьи, которая лишь усложнит построение нашего игрушечного трансформера. Поэтому, в качестве выхода из положения, мы просто зададим малое значение разброса данных в пределах сотых значений.

Также сгенерируем фиксированные эмбеддинги для токенов:

# Работа с вокабуляром:
def build_fixed_embeddings(vocab_size: int, random_state: int = 13) -> np.ndarray:
    """Ортогональные эмбеддинги"""
    rng = np.random.default_rng(random_state)
    mat = rng.standard_normal(size=(d_model, d_model))
    Q, _ = np.linalg.qr(mat)
    emb = Q[:vocab_size]
    return emb.astype(np.float32)


vocab = build_fixed_embeddings(vocab_size)
Start = 10
Finish = 11

Несмотря на то, что они не являются обучаемыми, ортогонализация делает их крайне легкими в заучивании моделью, которая хорошо различает подобные особенности.

Обратите на параметр vocab_size. Его вы также можете регулировать, чтобы создать вокабуляр иного размера для своих исследований!

Мультиголовое внимание

Мультиголовое внимание представляет из себя слой внимания с разбиением входных данных на части по последнему измерению D. Это делается для снижения количества параметров и возможности "раздельного внимания". Таким образом, каждая голова получает возможность запомнить свои уникальные признаки, что в итоге улучшает качество.

Представьте, что в сеть вошел крупный батч, состоящий из множества примеров, в каждом из которых огромное количество токенов. Каждый токен представлен в виде эмбеддинга = 512 значениям. В итоге, данные будут представлять из себя тензор размера [B, T, 512].

Для того чтобы сделать проекцию QKV, нам потребуются матрицы размера 512х512, имеющие приблизительно 2e5 значений. Очевидно, что это очень много и... не нужно. Учитывая, что у нас имеется множество слоев и блоков, в реальности нам хватит гораздо меньшего количества параметров. Так почему бы нам просто не разделить каждый эмбеддинг на партии и не подать их в отдельные головы?

X [B H D] -> X [B H T P], где P — это размер партии (участка эмбеддинга).

Таким образом, данные будут иметь иную размерность, например [Batch Head Token 32] при 16 головах. Соответственно у нас уже будет 16 обучаемых матриц 32х32. При несложных подсчетах мы получим 16 384 параметров, что на порядок меньше, чем раньше!

Рассмотрим модернизированный вариант внимания:

Проекция разделенных данных (рис12)
Проекция разделенных данных (рис12)

Обратите внимание, что суммирование делается уже по оси партии P. Поэтому нам обязательно нужно поменять ось токенов T и голов H местами, чтобы получить матрицы TxP для каждой головы, по которым мы будем вычислять внимание.

Многоголовое внимание (рис13)
Многоголовое внимание (рис13)

Далее выполняется стандартный алгоритм, но только теперь матриц внимания, каждая из которых была вычислена только на части данных (эмбеддингов), будет множество, и все они будут иметь полный размер по токенам TхT. Это значительно увеличивает гибкость такого механизма, так как интерпретаций отношения между языковыми единицами будет множество. Каждая из них выделит свои уникальные признаки и зависимости, и все это при уменьшенном количестве параметров!

Далее, после взвешивания (умножения на Xv), мы могли бы провести обратное преобразование нашего Z тензора и вернуть его к стандартной форме:

Z [B H T P] -> transpose -> Z [B T H P] -> reshape -> Z [B T D]

Однако, при таком подходе возникает новая проблема: разобщенность признаков. Каждая голова, словно DepthWise свертка в CNN, запоминает только свои признаки и не обменивается информацией с остальными. Мы не можем просто соединить показания каждой головы из конца в конец, не создав семантическую путаницу. Это тоже самое, что сгенерировать картинку путем решейпа последовательности: информация о локальных связях будет отсутствовать, и высокого качества мы никогда не получим.

Тут на помощь приходит еще один обучаемый параметр WO — общая/обобщающая матрица. Умножение на нее позволит объединить все признаки заново собранного тензора Z, извлеченные отдельными головами слоя.

Объединение результата (рис14)
Объединение результата (рис14)

Механизм мультивнимания — это тот случай, когда оптимизация и усиление не противоречат друг другу. Именно поэтому его разбор не является излишеством. А еще важно реализовать именно эту пусть и усложненную версию механизма внимания, дающую столько преимуществ, что мы и сделаем дальше.

Практика

Давайте реализуем слой Multi-Head Attention в виде обычной функции Python!

def MHA(X: np.ndarray, is_decoder: bool = False, index: int = 0, neg_inf: float = -1e9) -> tuple[np.ndarray, dict]:
    """Многоголовое внимание"""
    T = X.shape[1]

    # Разделение входной матрицы для мультивнимания:
    X = X.reshape(X.shape[0], T, heads, part_size)     # (B T H P)

    # Матрицы проекций:
    Q = np.einsum('bthd, hdp -> bhtp', X, MWQ[index])  # (B T H P)(H P P) (B H T P)
    K = np.einsum('bthd, hdp -> bhtp', X, MWK[index])  # (B T H P)(H P P) (B H T P)
    V = np.einsum('bthd, hdp -> bhtp', X, MWV[index])  # (B T H P)(H P P) (B H T P)

    # Матрица внимания:
    A = np.einsum('bhtp, bhfp -> bhtf', Q, K)          # (B H T P)(B H T P) (B H T T)
    A = A / np.sqrt(part_size, dtype=np.float32)       # Масштабирование

    # Маскирование внимания:
    if is_decoder:
        size = (X.shape[0], heads, T, T)
        mask = np.triu(
            np.full(size, neg_inf),
            k=1
        ).astype(np.float32)
        A = A + mask

    # Матрица взвешенны значений:
    A_softmax = softmax(A)
    Z = np.einsum('bhtf, bhfp -> bhtp', A_softmax, V)  # (B H T T)(B H T P) (B H T P)

    # Объединение голов:
    shape = (X.shape[0], T, d_model)
    Zo = Z.transpose(0, 2, 1, 3)                       # (B H T P) (B T H P)
    Zo = Zo.reshape(shape)                             # (B T H P) (B T D)
    Zo = np.einsum('btd, df -> btf', Zo, MWO[index])   # (B T D)(D D) (B T D)

    cache = {
        "X": X, "Q": Q, "K": K, "V": V,
        "A": A, "attn": A_softmax, "Z": Z,
        "index": index, "mask": mask if is_decoder else None,
    }
    return Zo, cache

Алгоритм следующий:

  • Разделение входных данных на головы [B, T, D] -> [B, H, T, P];
    В самом коде явная перестановка осей отсутствует, так как Einsum позволяет избежать ее.

  • Создание проекций запросов, ключей и значений;

  • Создание матрицы внимания: Xq * Xk;

  • Не забываем масштабировать: / sqrt(P);
    Здесь используем размер партии, так как данные все еще поделены на головы.

  • Перевод логитов в вероятность с помощью Softmax;

  • Получение матрицы взвешенных значений A * Xv;

  • Соединение данных transpose-reshape;
    Меняем местами оси H и T и делаем решейп, избавляясь от измерения голов.

  • Обобщаем выходы голов: Z * WO.

Обратите внимание на формы тензоров в комментариях к коду. Они помогут понять метаморфозы, которые влечет каждая операция.

*Еще тут есть возможность маскировки внимания, но о ней будет расказано в другом разделе статьи — "Параллельное обучение".

Позиционное кодирование

И все же есть нечто, что MHA не под силу — это самостоятельно определить позиции токенов в последовательности. Если в языковых моделях прошлых типов, информация о позиции сохранялась сама по себе, то в трансформере данные обрабатываются параллельно.

Из курса линейной алгебры, мы знаем, что матрицы это объекты, в которых количество строк и столбцов отвечает за количество векторов, записанных внутри, и измерений пространства. Дополнительные измерения многомерного тензора с формой [B T D] или [B H T P] говорят нам о порядке хранения пакетов данных и их обработке. Но само взаимодействие с линейными операторами происходит лишь по последней оси D векторных представлений конкретных токенов.

acb64e256be190aba159e7204c951c4d.png

Это означает, что MHA не "видит" то, в каком порядке они расположены друг от друга. Можно сравнить это с чтением учебника по одному слову с каждой страницы за раз. Информация есть, но смысла нет, так как наше внимание не может воспринимать ее таким образом. А значит и качество обучения будет низким. К счастью, мы можем внедрить информацию о позиции в сам токен!

Позиционное кодирование — это группа методов, с помощью которых мы сообщаем слоям внимания о положении токенов в последовательностях. Существует множество вариантов кодирования, среди которых:

  • Синусоидальное кодирование (Sinusoidal position encoding).
    Наложение частот на каждый эмбеддинг в зависимости от положения токена. Самый ранний метод, который был в оригинальной статье.

  • Относительное кодирование (Relative position encoding).
    Таблица фиксированных сдвигов, применяемая к матрице внимания токенов.

  • Координатное кодирование (Coordinate position encoding).
    Вплетение информации о координатах, путем сложения данных и отдельной обучаемой матрицы координат. Иногда даже с нелинейностью.

Это отдельная тема, которая требует хорошего понимания базы. И несмотря на то, что наш трансформер может заучить все комбинации в последовательностях малой длинны и выдать приемлемое качество, не включать реализацию этого слоя было бы большим упущением.

В этой статье мы ограничимся синусоидами. Однако, не стоит думать, что этот метод несерьезен. Это один из самых простых и действенных методов, которые применяются до сих пор!

  • Он легок для понимания и интерпретации;

  • Он не затратен по ресурсам;

  • Он легко экстраполируется на большие длины.

Есть разные объяснения его работы. Для себя я нашел аналогию с радиоволнами, на которые мы накладываем полезный сигнал, но наоборот. В нашем случае, мы уже имеем полезный "сигнал" — векторные представления токенов, на которые мы накладываем синусоиду, таким образом, что первый токен в последовательности получит самую высокую частоту, а последний самую низкую.

Синусоидальное позиционное кодирование (рис15)
Синусоидальное позиционное кодирование (рис15)

Трансформер будет замечать вкрапление этих частот в данные во время обучения, и постепенно заметит связь между позицией любого токена и частотой волны, которая идет с ним в комплекте.

Еще один интересный факт, что данные кодирование является абсолютным. То есть сколько бы данных не содержала последовательность, ее первый токен (эмбеддинг токена) получит одну и ту же волну, что и первый токен в любом другом наборе. Соответственно, если токенов больше, то их волны на одинаковых позициях будут также одинаковыми. Таким образом, запомнив принцип трансформер будет уверено ориентироваться во входных данных, даже если никогда не получал последовательности такой длины.

Практика

Давайте убедимся, что мы на одной волне! Код ниже.

def positional_encoding(X: np.ndarray) -> tuple[np.ndarray, dict]:
    """Позиционное кодирование токенов (наложение частот)"""
    B, T, D = X.shape

    # Номера позиций токенов:
    positions = np.arange(T, dtype=np.float32)[:, None]  # (T, 1)

    # Матрица частот:
    i = np.arange(D // 2, dtype=np.float32)         # Индексы эмбеддингов
    angles = positions * 10000 ** (-2 * i / D)      # (1, D)

    pe = np.zeros((T, D), dtype=np.float32)         # (T, D)
    pe[:, 0::2] = np.sin(angles)                    # Для чётных индексов
    pe[:, 1::2] = np.cos(angles)                    # Для нечётных

    pe = np.tile(pe, (B, 1, 1)).astype(np.float32)  # (B, T, D)

    return X + pe                                   # Наложение частот

Мы создаем последовательность по формуле positions 10000 * (-2 * i / D), а за тем применяем синусы и косинусы поочередно. После растягиваем на весь батч и добавляем к данным. Все.

Прямой проход

Должно быть, внимательный читатель уже заметил, что несмотря на множество шагов и многообразие обучаемых параметров в MHA, мы так и не выполнили ни одной нелинейной операции за исключением Softmax. Но ведь для нормальной работы сети, они необходимы! Простое перемножение параметров никогда не позволит сети выучить сложные зависимости и адекватно преобразовать входные данные. Именно поэтому в трансформерах существует отдельный блок, являющийся аналогом активации в полносвязных сетях.

FeedForward pass (рис16)
FeedForward pass (рис16)

FeedForward pass представляет из себя полносвязный слой с активацией и масштабированием. Обычно он содержит два линейных слоя со смещением для разных задач и активацию между ними.

  • Первый линейный слой увеличивает пространство признаков путем умножения на матрицу с расширением по измерению D (обычно в 4 раза):
    X [B, T, D] x W [D, Dx4] + B [Dx4,] -> X [B, T, Dx4];

  • Далее идет активация (простейший вариант — ReLU);

  • После нужен еще один слой масштабирования, который возвращает размер выхода к стандартному:
    X [B, T, Dx4] x W [Dx4, D] + B [D,] -> X [B, T, D].

Таким образом трансформер получает не только слой активации, но и дополнительные параметры для ее выполнения и возможность их регулировать.

Практика

Давайте же реализуем и этот блок.

def FF(X: np.ndarray, index: int = 0) -> tuple[np.ndarray, dict]:
    """Полносвязный блок с расширением"""
    X1 = np.einsum('BTD, DP -> BTP', X, FW1[index])   # (B T D)(D D) (B T D*ff)
    X2 = X1 + FB1[index]                              # (D*ff,) (B T D*ff)
    X3 = leakyrelu(X2)
    X4 = np.einsum('BTD, DP -> BTP', X3, FW2[index])  # (B T D)(D*ff D) (B T D)
    X5 = X4 + FB2[index]                              # (D,) (B T D)
    return X5, {
        "X": X, "W1": X1, "B1": X2,
        "act": X3, "W2": X4, "index": index
    }

Все размерности указаны в комментариях.

Перекрестное внимание

Итак, мы дошли до того момента, когда энкодер извлек из данных контекст, и нам предстоит сгенерировать ответное сообщение на его основе. Происходит это в цикле по одному токену за раз с помощью все тех же блоков со слоями Multi-head attention и Feedforward. Подробно этот процесс будет рассмотрен в разделе "Выходной слой и Автогенерация". А сейчас давайте ответим на вопрос: "Как именно генератор понимает контекст запроса?".

Встраивание информации о запросе, происходит с помощью слоя Multi-head cross-attention или Перекрестного внимания. Этот слой представляет из себя аналог MHA и отличается лишь методом проецирования данных через QKV.

Проекция запросов делается по входным данным декодера — сгенерированным токенам, начиная с технического Start. Когда как проекция ключей и значений делается по контексту из энкодера.

Кросс-внимание (рис17)
Кросс-внимание (рис17)

Таким образом генерируемые данные как бы "опрашивают" наш контекст, и все сообщение создается на его основе. Результат работы трансформера будет связан по смыслу с запросом пользователя. Чем мощнее энкодер, тем сильнее будет эта связь, вплоть до полного соответствия, которое необходимо в переводчиках или поисковиках. В случае с декодерными моделями, такими как ChatGPT, связь с запросом также будет, но без явного соответствия. Отсутствие энкодера делает их более "вольными", что хорошо для творческих задач.

Практика

Данный слой является полным аналогом MHA, но принимает на вход не только текущие данные, но и контекст из декодера.

def MHCA(X: np.ndarray, context: np.ndarray) -> tuple[np.ndarray, dict]:
    """Многоголовое перекрестное внимание"""

    # Разделение входной матрицы для мультивнимания:
    new_shape_X = (X.shape[0], X.shape[1], heads, part_size)
    new_shape_Z = (context.shape[0], context.shape[1], heads, part_size)
    X = X.reshape(new_shape_X)                         # (B Tx H P)
    context = context.reshape(new_shape_Z)             # (B Tz H P)

    # Матрицы проекций:
    Q = np.einsum('bthd, hdp -> bhtp', X, CWQ)         # (B Tx H P)(H P P) (B H Tx P)
    K = np.einsum('bthd, hdp -> bhtp', context, CWK)   # (B T H P)(H P P) (B H Tz P)
    V = np.einsum('bthd, hdp -> bhtp', context, CWV)   # (B T H P)(H P P) (B H Tz P)

    # Матрица внимания:
    A = np.einsum('bhxp, bhtp -> bhxt', Q, K)          # (B H Tx P)(B H Tz P) (B H Tx Tz)
    A = A / np.sqrt(part_size, dtype=np.float32)
    A_softmax = softmax(A)

    # Матрица взвешенных значений:
    Z = np.einsum('bhxt, bhtp -> bhxp', A_softmax, V)  # (B H Tx Tz)(B H Tz P) (B H Tx P)

    # Объединение голов:
    Zo = Z.transpose(0, 2, 1, 3)                       # (B H Tx P) (B Tx H P)
    shape = (X.shape[0], X.shape[1], d_model)
    Zo = Zo.reshape(shape)                             # (B Tx H P) (B Tx D)
    Zo = np.einsum('btd, df -> btf', Zo, CWO)          # (B Tx D)(D D) (B Tx D)

    cache = {
        "X": X, "context": context, "Q": Q, "K": K, "V": V,
        "A": A, "attn": A_softmax, "Z": Z,
    }
    return Zo, cache

Мы точно также применяем формулу внимания. Но проекция ключей K и значений V делается уже по контексту. Таким образом, входные данные из предыдущего слоя (маскированного MHA) учатся делать верный запрос к контексту из энкодера. И только после перекрестного внимания данные поступают в полносвязный слой FF.

По сути весь блок MHA -> MHCA -> FF выступает как единое целое. Если блоков несколько, то один и тот же контекст подается и в них. Таким образом генерируемая последовательность X протекает от начала декодера к выходному слою, а контекст подается из энкодера во все слои MHCA.

Выходной слой и Автогенерация

Как уже было сказано, трансформер создает ответ в режиме автогенерации — цикле, где предыдущее сообщение служит основой для новой его части. Запуск генерации осуществляется после обработки запроса энкодером, (подготовки контекста) с подачей стартового токена.

Итак, декодер получил на вход токен Start, провел его через цепочку MHA -> MHCA -> FF и выдал тензор размера [B, Tx, D]. Что дальше?

Теперь нужно сгенерировать следующий токен на основе этих данных и присоединить его к текущему сообщению (Start, новый токен и так далее). Для того чтобы определить, какой токен будет следующим, нам нужен "выходной слой", выдающий вероятности размера [B 1 V].

Работа выходного слоя (рис18)
Работа выходного слоя (рис18)

Таким образом, с помощью линейного преобразования, тензор размера [B T D] становится равным по ширине нашему вокабуляру [B T V], где V — это размер вокабуляра, то есть все возможные токены, которые только могут быть. Это позволяет нам получить по нему вероятностное распределение, но прежде нужно отбросить все предыдущие токены по измерению T, оставив только последние в каждом сообщении батча.

Out [B, T, V] -> Out [B, 1, V]

На первый взгляд, это покажется странным. Зачем терять столько информации ради приведения тензора в нужную форму? Но на самом деле, последние токены [B, 1, V] содержат в себе все необходимое, так как:

  1. Они являются конечными логитами выхода декодера, а не сырыми эмбеддингами, поступившими в начало сети;

  2. Они прошли вместе большой путь через слои декодера и обменялись информацией через внимание;

  3. Они являются последними, а значит "всевидящими" токенами в плане маскировки. Иными словами, им доступен обзор и внимание ко всем токенам в их последовательности.

Это означает, что у нас достаточно информации, чтобы сделать предсказание. Так что нормализовав тензор с помощью Softmax, мы получим вероятности следующих токенов для каждой последовательности.

Out [B, 1, V] -> Sotfmax -> Probs [B, 1, V] -> Argmax -> New tokens [B, 1]

Функция Argmax позволяет получить индекс наиболее вероятного токена для каждой последовательности батча. После, он присоединяется к итоговому сообщению в виде обычного индекса. При этом сами эмбеддинги с сообщении не хранятся. Если цикл генерации продолжается, то дополненное сообщение заново отправляется в декодер, получает эмбеддинги и проходит дальнейшие этапы.

Это продолжается пока цикл генерации не создаст максимальное количество токенов или, что наиболее вероятно, все сообщения в батче не получат токен остановки Stop.

Генерация (рис19)
Генерация (рис19)

Когда это произойдет, генерация оборвется раньше времени. До тех пор, последовательности, которые получили Stop раньше, будут заполнятся паддингами — это еще один вид технических токенов, нужных для работы сети.

Практика

Код выходного слоя поразительно прост: это всего лишь единственный линейный слой, только с выходом другой формы.

Из курса линейной алгебры мы знаем, что матрицы на выходе являются результатом работы линейного оператора, который расширяет/сжимает пространство признаков. То есть, была матрица формы [N K], где K - количество измерений (координат), а N - количество объектов, а стала [N M], где M - это новое число осей (измененное пространство признаков).

def output(X: np.ndarray) -> tuple[np.ndarray, dict]:
    """Конечный линейный слой проекции словаря"""
    Y = np.einsum('BTD, DV -> BTV', X, WO)  # (B T D)((D V) (B T V)
    Y = Y + BO                              # (B T V)
    return Y, {"X": X}

Таким образом мы можем связать наши данные со словарем, сделав проекцию нужной формы [B, T, V]. Пропустив выход через Softmax мы получим вероятности токенов-кандидатов. Индекс с самой высокой вероятностью будет соответствовать индексу нового токена в вокабуляре.

Vocab[ argmax( out ) ] - > [B, 1] — новый токен для каждого набора в батче.

На первый взгляд может показаться странным, как вероятность и нужный индекс слоя соответствует индексам расположенных в вокабулярии токенов. Но в этом и есть суть машинного обучения: мы подстроили все формы так, чтобы они могли работать без ошибок, а корректировка весов сделает все остальное.

Параллельное обучение

Итак, мы разобрались какой путь проделывает сообщение внутри трансформера. Поговорили о работе его слоев, о взаимодействии контекста с генератором и о том, как выходные логиты трансформируется в конкретные токены. Осталось разобраться, как все это обучить, ведь трансформер имеет довольно сложную структуру и принцип работы, особенно в декодере.

Зададим неправильные вопросы:

  • Каким образом генерируемое сообщение с переменной длиной по токенам, будет стыковаться с целевыми данными, представленными уже готовыми сообщениями?

  • Каким образом генератор, создающий собственное сообщение, будет учиться на сообщениях запроса пользователя?

  • Каким образом градиент будет протекать через цикл автогенерации модели?

Ответ: никаким.

И дело даже не в том, что это сложно и не рационально, а том что это попросту невозможно, так как функция Argmax, использующаяся в генераторе, не является непрерывной. Иными словами, у нее нет производной, в следствии чего граф обрывается, и градиенты уже не могут попасть в предшествующие слои.

Трансформеры полны удивительных сюрпризов. Помните как мультивнимание улучшило качество и одновременно ускорило работу модели? Так и здесь, на помощь приходит потрясающая вещь как параллельное обучение, позволяющее пропускать через трансформер сразу все сообщение целиком без циклов и отдельного предсказания токенов!

Этот подход корректирует все необходимые параметры модели и при этом вообще не задействует автогенерацию. Но чтобы понять работу такого обучения на фундаментальном уровне, давайте вернемся к истокам ML и вспомним, как вообще нейросети учатся на данных.

Сразу скажу, что это крайне важно, если хотите разобраться в трансформерах. Далее будет очень подробная логическая цепочка, которая приведет к ясному пониманию принципов процесса и их истоков.

Допустим у нас есть таблица с данными для бинарной классификации:

Feature 1

Feature 2

***

Feature P

Target

1

.452

.179

***

.256

1

2

.123

.018

***

.235

0

3

.014

.653

***

.201

1

***

***

***

***

***

***

N

.706

.481

***

.199

1

Есть признаки, которые поступают на вход. Есть выход (предсказания) модели. И, наконец, имеется целевой признак по которому мы будем вычислять ошибку наших предсказаний. Так и в текстовых моделях есть: сообщение запроса и ожидаемый ответ.

Как решить нестыковку переменной длины сообщений с конечным вариантом?

Мы уже говорили о том, что трансформер может принимать на вход гибкое количество токенов — это связано с механикой внимания. Более того, такая особенность является необходимой, так как текстовые последовательности обычно не фиксированы по длине. Декодер в режиме генерации, также вынужден постепенно наращивать сообщение по оси T. Это означает, что одна и та же информация проходит через него множество раз. Так почему бы нам сразу не взаимодействовать с конечным вариантом сообщений, то есть с целевым ответом в его законченном виде? Это отвечает на вопрос о том, почему нам не нужны промежуточные варианты target-ов.

Какие данные подаются в декодер в качестве обучающих?

Мы уже знаем, что будем сравнивать с таргетом только конечные варианты выходных сообщений. Также мы знаем, что сообщение всегда начинается с технического токена Start, нужного для запуска цикла. Однако, что именно нужно подать в Декодер, чтобы получить этот самый конечный вариант, содержащий ожидаемое (и никак иначе) количество токенов, которое должно совпасть с таргетом для вычисления ошибки?

Если в режиме генерации мы можем позволить себе вольности: гибкую длину сообщений, пустой вывод, зацикливание, ленивый вывод и тому подобное, то в режиме обучения сообщения всегда должны совпадать по всем измерениям: Prediction size = target size!

Чтобы ответить на этот вопрос, нужно задать еще один... Что предшествовало конечному сообщению декодера? То есть, каким было сообщение декодера, до того как мы получили конечный его вариант? Ответ: оно было таким же, но на один токен меньше.

Предпоследняя итерация -> Out [B T-1 D] -> Последняя итерация -> Out [B T D]

Формы сообщений (рис20)
Формы сообщений (рис20)

Это означает, что сообщение декодера было идентичным прошлому, за исключением последнего (добавленного на последней итерации) токена. Учитывая, что мы вынуждены всегда добавлять токен Stop к сообщению в конце, чтобы научить модель останавливаться, то мы полностью знаем это сообщение! Это тот же самый target, но без токена Stop, которого нет на предпоследней итерации (модель его как бы еще не предсказала).

Получается, что на вход декодера в режиме обучения мы подаем Start + trarget (предпоследний шаг), а сравнивать Predictions модели мы будем с trarget + Stop (последний шаг) — конечное сообщение, которое должна предсказать модель.

Номера токенов

Обучающее сообщение

Предсказание декодера

Целевое сообщение

1

Start

Я

Я

2

Я

Что-то

Иду

3

Иду

Выдаю

В

4

В

Параллельно

Магазин

5

Магазин

Обучаясь

Stop

Start предскажет токен "Я". Токен "Я" предскажет токен "Иду" и так далее, пока токен "Магазин" не предскажет Stop. Вот что такое параллельное обучение: токены предсказывают сами себя по целевым данным. То есть таргет используется и там и там: и в качестве обучающего сообщение и в качестве целевого!

Внимательный читатель, разумеется, задумается об очевидном следствии данного процесса — переобучении. Если мы используем одно и тоже сообщение для обучения, то каким образом модель вообще сможет обобщать данные?

С первого взгляда кажется, что это как подать целевой признак вместе с обучающим: модель быстро приспособиться к нему и выдаст идеальное качество на train, не имея никакой обобщающей способности. Этот страх не является безосновательным.

Ответ: никаким...

Но только если мы не запретим токенам видеть будущее. Вспомним нашу таблицу внимания из начала статьи:

T1 Start

T2 Я

T3 Иду

T4 В

T5 Магазин

Start

.5

0

0

0

0

Я

.25

.5

0

0

0

Иду

.2

.2

.5

0

0

В

0

0

.15

.7

0

Магазин

.05

.2

.2

.1

.5

Похоже, что в ней что-то изменилось: все значения внимания токенов, стоящих после текущего, обнулились, словно какая-то неведомая сила не дает им заглянуть в будущее и узнать, какой токен станет следующим. А ведь они и не должны этого знать!

Этот прием называется маскированием внимания.

Маскировка(рис21)
Маскировка(рис21)

Любой токен, идущий следом, не доступен для внимания предыдущего. Таким образом, значения таблицы внимания могут быть только у самого токена и у всех, что стоят до него. Все остальные значения получают -inf (на деле очень большое отрицательное число, например -1e9) для того чтобы Softmax обнулил их следующим шагом.

И того мы имеем следующую схему обучения:

Схема подачи данных (рис22)
Схема подачи данных (рис22)

Данные запроса поступают на вход энкодера. Токен Start + "целевое сообщение" поступает в декодер. Формируется ответ, имеющий сразу же все токены, которые мы от него ожидаем, который сравнивается с "целевым сообщением" + токен Stop. Специфичные для цикла автогенерации блоки (argmax и concat) даже не задействуются, так как не имеют обучаемых параметров.

Практика

Для обучения нам понадобится сразу несколько методов.

Для начала мы должны вычислить ошибку модели. Будем использовать разряженную Перекрестную энтропию. Ее особенность в том, что она принимает номера токенов, а не векторные представления вероятностей типа [0 0 1 0 ... 0].

def SparseCrossEntropy(prediction: np.ndarray, target: np.ndarray, eps: float = 1e-8) -> tuple[int, np.ndarray]:
    """
    prediction: [B, T, V] — логиты
    target: [B, T] — индексы правильных токенов
    """
    probs = softmax(prediction)
    B, T, V = probs.shape

    correct_probs = probs[np.arange(B)[:, None], np.arange(T)[None, :], target]

    loss_value = -np.sum(np.log(correct_probs + eps), dtype=np.float32)
    loss_value = loss_value / (B * T)
    loss_value = np.array(loss_value, dtype=np.float32)  # ensure scalar-array of correct dtype

    grad_prediction = probs.copy().astype(np.float32)
    grad_prediction[np.arange(B)[:, None], np.arange(T)[None, :], target] -= 1.0
    grad_prediction /= (B * T)

    return loss_value, grad_prediction

Следующей ступенью обучения будет обратный проход.

В отличии от динамически строящегося графа, где каждая операция (сложение, суммирование, усреднение и прочая математика) кэширует всю необходимую информацию и порождает новый объект класса Тензор со ссылками на родителей, статичный граф нуждается в обратных функциях, аналогичных слоям. Они необходимы чтобы вычислить градиент для каждого узла, имеющего обучаемые параметры по методу производной сложной функции:

(F(G(x)))' = F'(G(x)) * G'(x)

Модель словно луковица разворачивается через умножение входящего градиента на производную каждой ветви графа.

Данные методы стоит прочитать для общего понимания, но не более, ибо так уже давно никто не делает. Я выбрал этот алгоритм (из-за чего пришлось переписывать половину кода), поскольку динамический граф требует от читателя обязательного знания ООП. Кроме того, он менее прозрачен, так как вся работа происходит в скрытых объектах класса Тензор. Когда как обратные функции представляют из себя полный аналог прямых, но более длинный. И все же по ним можно легко понять, что именно происходит с входным объектом.

Код обратных функций для всех слоев:

def backward_normalize(dY: np.ndarray, cache: dict) -> tuple[np.ndarray, dict]:
    """
    Форма dY: (B, T, D)
    Возврат:
        dX: (B, T, D)
    """
    X = cache["X"]
    rms = cache["rms"]
    D = X.shape[-1]
    return (dY / rms - X * np.sum(dY * X, axis=-1, keepdims=True) / (D * rms**3))

def backward_MHA(dZ: np.ndarray, cache: dict) -> tuple[np.ndarray, dict]:
    """
    Форма dZo: (B, Tx, D)
    Возврат:
        dX: (B, T, D)
        grads: словарь градиентов
    """
    X = cache["X"]              # (B T H P)
    Q = cache["Q"]              # (B H T P)
    K = cache["K"]              # (B H T P)
    V = cache["V"]              # (B H T P)
    A_softmax = cache["attn"]   # (B H T T)
    Z = cache["Z"]              # (B H T P)
    index = cache["index"]

    B, T, _, _ = X.shape

    # Производная общей матрицы WO:
    dMWO = np.einsum(
        'btd, btf -> df',
        Z.transpose(0, 2, 1, 3).reshape(B, T, d_model),
        dZ
    )                                                         # (B T D1)(B T D2) (D1 D2)
    dZ = np.einsum(
        'btd, fd -> btf',
        dZ,
        MWO[index]
    ).reshape(B, T, heads, part_size).transpose(0, 2, 1, 3)   # (B T D)(D1 D2) (B T D1) (B H T P)

    # Производная для проекции значений V:
    dA = np.einsum('bhtp, bhfp -> bhtf', dZ, V)               # (B H T P)(B H T P) (B H T T)
    dV = np.einsum('bhit, bhtp -> bhip', A_softmax, dZ)       # (B H T1 T2)(B H T P) (B H T1 P)

    # Обнуление градиентов (если есть маска):
    if (mask := cache["mask"]) is not None:
        dA = np.where(mask == 0, dA, 0.0).astype(np.float32)

    # Производная софтмакса:
    tmp = np.sum(dA * A_softmax, axis=-1, keepdims=True)
    dA = A_softmax * (dA - tmp)
    dA = dA / np.sqrt(part_size, dtype=np.float32)

    # Производная внимания:
    dQ = np.einsum('bhtf, bhtp -> bhfp', dA, K)              # (B H T1 T2)(B H T1 P) (B H T2 P)
    dK = np.einsum('bhtf, bhfp -> bhtp', dA, Q)              # (B H T1 T2)(B H T2 P) (B H T1 P)

    # Производная по проекции входных данных:
    dMWQ = np.einsum('bthp, bhtf -> hfp', X, dQ)             # (B T H P)(B H T P) (H P P)
    dMWK = np.einsum('bthp, bhtf -> hfp', X, dK)             # (B T H P)(B H T P) (H P P)
    dMWV = np.einsum('bthp, bhtf -> hfp', X, dV)             # (B T H P)(B H T P) (H P P)

    # Производная по входу:
    dX = (
        np.einsum('bhtp, hfp -> bthf', dQ, MWQ[index]) +     # (B T H P)(H P1 P2) (B T H P1)
        np.einsum('bhtp, hfp -> bthf', dK, MWK[index]) +     # (B T H P)(H P1 P2) (B T H P1)
        np.einsum('bhtp, hfp -> bthf', dV, MWV[index])       # (B T H P)(H P1 P2) (B T H P1)
    ).reshape(B, T, d_model)

    return dX, {
        "MWQ": dMWQ,
        "MWK": dMWK,
        "MWV": dMWV,
        "MWO": dMWO
    }


def backward_MHCA(dZ: np.ndarray, cache: dict) -> tuple[np.ndarray, dict]:
    """
    Форма dZo: (B, Tx, D)
    Возврат:
        dX: (B, Tx, D)
        dContext: (B, Tz, D)
        grads: словарь градиентов
    """

    X = cache["X"]                 # (B Tx H P)
    context = cache["context"]     # (B Tz H P)
    Q = cache["Q"]                 # (B H Tx P)
    K = cache["K"]                 # (B H Tz P)
    V = cache["V"]                 # (B H Tz P)
    A_softmax = cache["attn"]      # (B H Tx Tz)
    Z = cache["Z"]                 # (B H Tx P)

    B, Tx, H, P = X.shape
    Tz = context.shape[1]

    # Производная общей матрицы WO:
    dCWO = np.einsum(
        'btd, btf -> df',
        Z.transpose(0, 2, 1, 3).reshape(B, Tx, d_model),
        dZ
    )                                                     # (B T D1)(B T D2) (D1 D2)
    dZ = np.einsum(
        'btd, fd -> btf',
        dZ,
        CWO
    ).reshape(B, Tx, H, P).transpose(0, 2, 1, 3)          # (B Tx D)(D1 D2) (B Tx D1) (B H Tx P)

    # Производная для проекции значений V:
    dA = np.einsum('bhtp, bhfp -> bhtf', dZ, V)           # (B H Tx P)(B H Tz P) (B H Tx Tz)
    dV = np.einsum('bhtf, bhtp -> bhfp', A_softmax, dZ)   # (B H Tx Tz)(B H Tx P) (B H Tz P)

    # Производная софтмакса:
    tmp = np.sum(dA * A_softmax, axis=-1, keepdims=True)
    dA = A_softmax * (dA - tmp)
    dA = dA / np.sqrt(part_size, dtype=np.float32)

    # Производная внимания:
    dQ = np.einsum('bhtf, bhfp -> bhtp', dA, K)           # (B H Tx Tz)(B H Tz P) (B H Tx P)
    dK = np.einsum('bhtf, bhtp -> bhfp', dA, Q)           # (B H Tx Tz)(B H Tx P) (B H Tz P)

    # Производная по проекциям входных данных:
    dCWQ = np.einsum('bthp, bhtf -> hpf', X, dQ)          # (B Tx H P)(B H Tx P) (H P P)
    dCWK = np.einsum('bthp, bhtf -> hpf', context, dK)    # (B Tx H P)(B H Tz P) (H P P)
    dCWV = np.einsum('bthp, bhtf -> hpf', context, dV)    # (B Tx H P)(B H Tz P) (H P P)

    # Производная по входу (X и Z):
    dX = np.einsum(
        'bhtp, hfp -> bthf', dQ, CWQ
    ).reshape(B, Tx, d_model)                             # (B Tx H P)(H P1 P2) (B Tx H P1)
    dZ = (
        np.einsum('bhtp, hfp -> bthf', dK, CWK) +         # (B Tz H P)(H P1 P2) (B Tz H P1)
        np.einsum('bhtp, hfp -> bthf', dV, CWV)           # (B Tz H P)(H P1 P2) (B Tz H P1)
    ).reshape(B, Tz, d_model)

    grads = {
        "CWQ": dCWQ,
        "CWK": dCWK,
        "CWV": dCWV,
        "CWO": dCWO
    }

    return dX, dZ, grads


def backward_FF(dX5: np.ndarray, cache: dict) -> tuple[np.ndarray, dict]:
    """
    Форма dX5: (B, T, D)
    Возврат:
        dX: (B, T, D)
        grads: словарь градиентов
    """
    X  = cache["X"]         # (B T D)
    X1 = cache["W1"]        # (B T D*ff)
    X2 = cache["B1"]        # (D*ff,)
    X3 = cache["act"]       # (B T D*ff)
    index = cache["index"]  # (i)

    # Градиент для Байес 2:
    dFB2 = np.sum(dX5, axis=(0, 1))                            # (B T D) (D,)

    # Производная линейного слоя 2:
    dFW2 = np.einsum('btd, btp -> dp', X3, dX5)                # (B T D*ff)(B T D) (D*ff D)
    dX3 = np.einsum('btp, dp -> btd', dX5, FW2[index])         # (B T D)(D*ff D) (B T D*ff)

    # Производная нелинейного слоя:
    dX2 = dX3 * np.where(X2 > 0, 1.0, 0.1).astype(np.float32)  # (B T D*ff)

    # Градиент для Байес 1:
    dFB1 = np.sum(dX2, axis=(0, 1))                            # (D*ff,)

    # Производная линейного слоя 1:
    dFW1 = np.einsum('btd, btp -> dp', X, dX2)                 # (B T D)(D D*ff) (D, D*ff)
    dX = np.einsum('btp, dp -> btd', dX2, FW1[index])          # (B T D*ff)(D D*ff) (B T D)

    grads = {
        "FW1": dFW1,
        "FB1": dFB1,
        "FW2": dFW2,
        "FB2": dFB2
    }

    return dX, grads


def backward_output(dY: np.ndarray, cache: dict) -> tuple[np.ndarray, dict]:
    """
    Форма dY: (B, T, V)
    Возврат:
        dX: (B, T, D)
        grads: словарь градиентов
    """
    X = cache["X"]

    # Производная сдвига:
    dBO = np.sum(dY, axis=(0, 1))             # (V,)

    # Производная по весам:
    dWO = np.einsum('btd, btv -> dv', X, dY)  # (B T D)(B T V) (D V)

    # Производная по входу:
    dX = np.einsum('btv, dv -> btd', dY, WO)  # (B T V)(D V) (B T D)

    grads = {
        "WO": dWO,
        "BO": dBO
    }

    return dX, grads

Операции можно разделить на два вида: промежуточные и локальные. Одни нужны для передачи градиента дальше, другие непосредственно для корректировки весов. Промежуточные результаты записываются в специальный кэш, нужный алгоритму для оптимизации, и выводятся вместе с конечным значением.

Наконец, нам нужна верхнеуровневневая функция обратного вызова, являющаяся аналогом Call. Она запускает все нужное в обратном порядке и выводит результаты для всех обучаемых параметров.

def backward(loss: np.ndarray, cache) -> tuple[dict, ...]:
    """
    Обратный проход.
    Возвращает наборы градиентов для каждого слоя.
    """
    # Декодер:
    dX, grads1 = backward_output(loss, cache['Out'])
    dXr = backward_normalize(dX, cache['Norm6'])

    dX, grads2 = backward_FF(dXr, cache['FF-D'])
    dX = backward_normalize(dX, cache['Norm5'])
    dXr = dXr + dX

    dX, dZ, grads3 = backward_MHCA(dXr, cache['MHCA'])
    dX = backward_normalize(dX, cache['Norm4'])
    dXr = dXr + dX

    dX, grads4 = backward_MHA(dXr, cache['MHA-D'])
    # dX = backward_normalize(dX, cache['Norm3'])
    # dXr = dXr + dX

    # Энкодер:
    dX, grads5 = backward_FF(dZ, cache['FF-E'])
    dX = backward_normalize(dX, cache['Norm2'])
    dXr = dX + dZ

    dX, grads6 = backward_MHA(dXr, cache['MHA-E'])
    # dX = backward_normalize(dX, cache['Norm1'])
    # dXr = dXr + dX

    return grads6, grads5, grads4, grads3, grads2, grads1

Я закомментировал некоторые строки, поскольку дальнейшая трансляция градиента не требуется. В серьезных фреймворках, как и в моем, используется параметр request_grad, отсекающий ветви графа, если на них больше не осталось обучаемых тензоров. Зачем вести градиент по ветви, если на ней нет потребителей? Это важный элемент оптимизации в больших моделях.

Стабилизация обучения

Эта бонусная глава для патологически глубокого понимания трансформеров. В ней я расскажу о нормализации, остаточных связях и масштабировании. Если вы пока неуверенно чувствуйте себя в математике нейросетей, то можете ее пропустить.

Как я сказал ранее, главной проблемой трансформеров является их интуитивное понимание. Если эта статья помогла ее решить, то пол дела сделано! На очереди следующая уже техническая задача, свойственная для deeplearning в целом: стабилизация обучения. Мало написать алгоритм, сгенерировать веса и подать данные, даже для минимального результата, ибо глубокие сети крайне капризны и так и норовят застрять в локальном минимуме, затухнуть или взорваться. И никакой оптимизатор тут не поможет, если не знать все ловушки, которые поджидают задолго до того, как он вступит в работу. Об этом далее.

В этой главе мы не будем рассматривать общие для всех сетей проблемы, такие как застревание в ЛМ, мертвые нейроны, переобучение, неравноправное обновление весов и другие. Достаточно сказать, что с большей частью справляется Адам и простейшая регуляризация. Здесь я хочу рассмотреть более специфичные для трансформеров препятствия и меры. Однако, если вам все же интересно о них узнать, то возможно позже я напишу полноценную статью на эту тему.

Взрыв градиента.

Представим, что мы запускаем трансформер, параметры которого только что были инициализированы случайными значениями. Ожидаемо, что ошибка на первой эпохе будет очень большой, так как модель еще не обучена. И проблема даже не в самом значении ошибки, а в его следствии — неэффективном обучении. Дело в том, что градиент будет пытаться компенсировать ее путем огромного шага в сторону наискорейшего убывания, то есть высокими конечными значениями для обучаемых параметров. И даже если в самом оптимизаторе мы ограничили его путем выставления скорости обучения или клиппингом (Gradient clipping), это не отменяет того факта, что по пути он дорастет до запредельных значений. То есть, возникнет переполнение довольно ограниченного типа float32 промежуточных тензоров, которое, прежде всего, убивает сам смысл графа вычислений. Это как вставить в некое прикладное инженерное выражение пару бесконечностей: оно утратит практический смысл. Эта проблема называется "взрывом градиента".

Изменение значений тензора внутри слоя (рис23)
Изменение значений тензора внутри слоя (рис23)

Затухание градиента.

Обратной стороной неконтролируемого роста градиента является его затухание. Если значения начальных тензоров находятся в приемлемом диапазоне, то многократное умножение таких матриц в слоях приведет к стремительному затуханию. Если это произойдет, то нормальное обновление весов, зависящее от самого градиента, будет уже невозможно, так как ошибка модели не изменится.

27769d234b1edc1b0a5fc5a427eed07d.png

Нет корректировки весов, нет падения ошибки и нет полезного градиента — это замкнутый круг, который означает прекращение обучения.

Изменение значений тензоров на прямом проходе.

Эта проблема похожа на две предыдущие. Рост и падение значений на прямом проходе также имеет место при многократном умножении матриц.

В обычных сетях эта проблема не такая явная. Но слои трансформера серьезно отличаются от слоев других типов нейросетей, поскольку содержат огромное количество последовательных действий. Например, свертки обрабатывают изображения в параллельном режиме. Линейные слои содержат одну обучаемую матрицу и байес. А слой MHA трансформеров содержит несколько непараллельных этапов: проекция, внимание, взвешивание, обобщение. Это эквивалентно четырем линейным слоям!

Давайте для примера возьмем матрицы с разным порядком значений и умножим одну на другую:

Рост и затухание значений тензоров (рис25)
Рост и затухание значений тензоров (рис25)

Содержимое итоговых матриц изменились на порядок. Если мы продолжим это дело, то увидим ту же тенденцию. Причина тому — механика умножения матриц с произведением и суммированием элементов. Очевидно, если умножить матрицы больших размеров, то проблема только усугубиться.

Искажение данных.

Даже если отбросить сильное отклонение, само по себе прохождение данных через многочисленные слои меняют их не в лучшую сторону. Обученный слой делает прошедший батч абстрактным представлением вошедших данных. Дальнейшее прохождение по глубокой сети только усугубляет эту проблему. Что уж говорить о необученной модели, если после первого же слоя данные настолько искажены, что оригинальная информация, идущая к последующим слоям, просто теряется.

Утрата смысл данных в необученных слоях (рис26)
Утрата смысл данных в необученных слоях (рис26)

Это серьезно замедляет сходимость, так как приходится ждать пока начальные слои будут скорректированы градиентом, идущим с конца.


Как видно, пренебрежение этими особенностями сделает обучение трансформера хаотичным и нестабильным. Даже если простота архитектуры и случайное везение позволят обучать голую модель, то вряд ли она будет сходиться быстро и достигнет наилучшего результата.

Давайте рассмотрим некоторые меры, которые должны помочь нам выстроить безопасный алгоритм.

Нормализация.

Зайдем с козырей.

Нормализация — это комплекс мер по преобразованию данных с целью препятствия негативным эффектам линейных операций.

Обычно под ней подразумевается центрирование, нормирование в диапазоне и масштабирование значений (в том числе обучаемое). Оно позволяет не только компенсировать набегающие в слоях отклонения, но и помочь их предотвратить! Это одна из самых эффективных мер, реализацией которой не стоит пренебрегать, что мы и сделаем в практической части.

Рассмотрим изображение операций с матрицами, прошедшими грамотную нормализацию:

Влияние преобразований на стабильность (рис 27)
Влияние преобразований на стабильность (рис 27)

Центрирование и нормирование данных в диапазоне (-1, 1) приводит к существенной устойчивости признаков к различным операциям, даже если обучаемые параметры изначально имеют некачественные значения. Наряду с грамотной инициализацией обучаемых матриц, о чем я упоминал в практической части главы о самовнимании, нормализация ускорят обучение и делает его более стабильным.

Масштабирование.

Но все же одной нормализацией не обойтись.

Фактор роста дисперсии с увеличением масштаба (рис28)
Фактор роста дисперсии с увеличением масштаба (рис28)

Предполагаю, что деление в формуле внимания, оставшееся за скобками, для многих до сих пор держало интригу. Что это за загадочный корень и зачем он нужен? И как ни странно, связано это со статистикой.

Я написал небольшую функцию, которая генерирует случайные матрицы разных размеров с фиксированным СКО, центрирует их и перемножает. После, мы вычисляем модуль среднего (поскольку нас интересует сама величина) и стандартное отклонение. Для сбора статистики, мы проводим множество таких экспериментов (например 1к) и заносим их в отдельный список для каждого размера матриц и усредняем.

def statistic_matrix(
        sizes: list, experiments: int,
        round_num: int = 9,
        scale: int = 1, scaling: bool = False
) -> None:
    sizes.extend(sizes)
    sizes_pair = sorted(sizes)
    statistics_std = ([], [], [], [])
    statistics_avg = ([], [], [], [])
    for _ in range(experiments):
        # Генерация матриц:
        matrices = []
        matrix = None
        for i in sizes_pair:
            matrix = np.random.normal(size=(i, i), scale=scale)
            matrices.append(matrix)

        # Центрирование матриц:
        matrices = [matrix - matrix.mean() for matrix in matrices]

        # Сбор статистики:
        pairs = zip(matrices[:-1:2], matrices[1::2])
        for i, (matrix_1, matrix_2) in enumerate(pairs):
            # m1 = round(matrix_1.mean(), round_num)
            # m2 = round(matrix_2.mean(), round_num)
            result = matrix_1 @ matrix_2
            result /= np.sqrt(len(result)) if scaling else 1

            avg = round(abs(result.mean()), round_num)
            std = round(result.std(), round_num)
            statistics_avg[i].append(avg)
            statistics_std[i].append(std)

    # Вывод:
    for i, (avg, std) in enumerate(zip(statistics_avg, statistics_std)):
        avg = round(np.mean(avg), round_num)
        std = round(np.mean(std), round_num)
        print(f"Матрицы размера {sizes[i]},   СКО = {std},   Среднее = {avg}")

Запускаем первый эксперимент:

experiments = 1000        # Количество экспериментов
sizes = [3, 16, 64, 512]  # Размеры матриц
round_num = 5             # Округление
scale = 1                 # Стандартное отклонение
scaling = False           # Масштабирование

statistic_matrix(sizes, experiments, round_num, scale, scaling)

Матрицы размера 3, СКО = 1.37415, Среднее = 0.34911
Матрицы размера 16, СКО = 3.96705, Среднее = 0.19906
Матрицы размера 64, СКО = 7.9948, Среднее = 0.10101
Матрицы размера 512, СКО = 22.62789, Среднее = 0.03494

Теперь мы видим, что отклонение от центра при произведении уменьшается с увеличением размера матриц. Большие матрицы более стабильны, что явно нам на руку. Однако, стандартное отклонение неуклонно растет!

С повышением размерности векторов (матриц/тензоров), растет и количество вариантов конкретных значений. Мы не знаем заранее, какими они будут, так как СГС и инициализация являются стохастическим процессом. Если увеличиваются данные, то увеличивается количество вариантов, а значит и сама вариативность. Как следствие, дисперсия — мера разброса данных, начинает увеличиваться. Возникает все больше выбросов и значений, стоящих на достаточном удалении от центра.

Пусть средние значение результата почти не изменилось, сами эти значения начали выходить за предпочтительный диапазон. А это прямой путь к переполнению (рис23).

Теперь становится ясно, зачем нам нужно масштабирование в формуле внимания.

Масштабирование (рис29)
Масштабирование (рис29)

Запустим код еще раз, но на этот раз выполним scaling.

experiments = 1000        # Количество экспериментов
sizes = [3, 16, 64, 512]  # Размеры матриц
round_num = 5             # Округление
scale = 1                 # Стандартное отклонение
scaling = True            # Масштабирование

statistic_matrix(sizes, experiments, round_num, scale, scaling)

Матрицы размера 3, СКО = 0.77202, Среднее = 0.18582
Матрицы размера 16, СКО = 0.99305, Среднее = 0.04576
Матрицы размера 64, СКО = 0.99852, Среднее = 0.01214
Матрицы размера 512, СКО = 0.99998, Среднее = 0.00157

Теперь мы видим, что отклонение стремиться к 1 — значению, которое было у родительских матриц. Вы сами можете провести эксперименты с различными параметрами. Код будет в моем учебном репозитории.

Остаточные связи.

Вспомним общую схему трансформера (рис1).

(рис1)
(рис1)

При ее описании я упомянул, что данные, поступающие на вход слоя, складываются с его выходом подобно skip connections в сверточных сетях, где они препятствовали затуханию градиента. Также, это позволяет первоначальной информации проходить глубоко в сеть, минуя полную модификацию внутри слоев и сохраняя оригинальную семантику. Это упрощает обучение и ускоряет сходимость.

Остаточные связи (рис30)
Остаточные связи (рис30)

Теперь проблема искажения, описанная выше, уже не страшна.

Прогрев модели и планировка скорости.

Как я упомянул ранее, необученная модель обладает огромной ошибкой. Все параметры со случайными значениями, будут получат большой градиент в течении первых шагов. Подобное обновление будет лишь швырять значения весов из стороны в сторону и, в лучшем случае, замедлит процесс обучения. Этого нужно избежать!

(рис31)
(рис31)

Почему бы нам не ограничить скорость на первых порах? Почему бы не начать с 0 и не набирать скорость постепенно до "стартовой", с которой и начнется основное обучение? Данный процесс называется прогревом.

Кроме того, вовсе не обязательно и даже не желательно оставаться на заданной скорости все обучение. В начале лучше сделать несколько крупных шагов для быстрого прогресса и преодоления локальных минимумов. В дальнейшем скорость лучше снизить до приемлемых значений. И у же ближе к концу, когда абсолютный минимум уже найден, аккуратно отъюстировать веса на малых скоростях. Этот принцип называется планировкой скорости.


Это далеко не все приемы, позволяющие стабилизировать обучение, но каждый из них будет задействован в нашем трансформере. Кроме того, один метод из категории регуляризации, вы сможете реализовать сами в Домашнем задании.

Практика

Функция простой необучаемой нормализации:

def normalize(X: np.ndarray, eps: float = 1e-8):
    """Простая нормализация без масштабирования и обучаемых параметров"""
    rms = np.sqrt(np.mean(X**2, axis=-1, keepdims=True) + eps)  # (B T 1)
    cache = {
        "X": X,
        "rms": rms
    }
    return X / rms, cache

Как и обещал, мы воспользуемся продвинутой версией СГС со стабилизацией и сохранением момента (экспоненциальное скользящее среднее) скоростей. Это известный всем Адам, который наверняка заслуживает отдельной статьи про оптимизаторы.

def optimizer(
        parameters: list, gradients: list,
        step: int, state: dict,
        beta1=0.9, beta2=0.999, eps=1e-8
) -> dict:
    """Оптимизатор Адам"""

    if 'm' not in state:
        state['m'] = [np.zeros_like(p) for p in parameters]
        state['v'] = [np.zeros_like(p) for p in parameters]

    gradients = [elem for values in gradients for elem in values.values()]
    for i, (p, g) in enumerate(zip(parameters, gradients)):
        # Моменты:
        state['m'][i] = beta1 * state['m'][i] + (1 - beta1) * g
        state['v'][i] = beta2 * state['v'][i] + (1 - beta2) * (g * g)

        # Байес:
        m_hat = state['m'][i] / (1 - beta1 ** step)
        v_hat = state['v'][i] / (1 - beta2 ** step)

        # Обновление параметра:
        p -= sheduler(step) * m_hat / (np.sqrt(v_hat) + eps)

    return state

Запуск модели

Вот и настало время запуска нашего трансформера!
Если вы не планируйте изучать код, то пропустите этот раздел.

Перед тем как пройти далее, я советую запустить следующий скрипт. Он представляет из себя проверку выводимых форм для составных частей модели и не является обязательным. Советую воспользоваться им при первом запуске для того чтобы понять, что все функции и импорты на месте, а выводы верные. Это поможет сразу исключить возможные ошибки на этом этапе.

size = (batch, max_tokens, d_model)
data = np.random.random(size).astype(np.float32)

# Проверка основных слоев:
X, cache_MHA = MHA(data, index=0)
assert X.shape == data.shape, "Формы данных входа и выхода не совпали!"
print("MHA", X.shape)

X, cache_MHCA = MHCA(data, X)
assert X.shape == data.shape, "Формы данных входа и выхода не совпали!"
print("MHCA", X.shape)

X, cache_FF = FF(X, index=0)
assert X.shape == data.shape, "Формы данных входа и выхода не совпали!"
print("FF", X.shape)

X, cache_out = output(X)
assert (size[0], size[1], vocab_size) == X.shape, "Формы данных входа и выхода не совпали!"
print("Out", X.shape, '\n')

# Проверка обратных слоев:
dX, grads = backward_output(X, cache_out)
assert dX.shape == data.shape, "Формы данных входа и выхода не совпали!"
print("dOut", dX.shape)

dX, cache = backward_FF(dX, cache_FF)
assert dX.shape == data.shape, "Формы данных входа и выхода не совпали!"
print("dFF", dX.shape)

dX, dZ, cache = backward_MHCA(dX, cache_MHCA)
assert dX.shape == data.shape, "Формы данных входа и выхода не совпали!"
assert dZ.shape == data.shape, "Формы данных входа и выхода не совпали!"
print("dMHCA", dX.shape, dZ.shape)

dX, grads = backward_MHA(dX, cache_MHA)
assert dX.shape == data.shape, "Формы данных входа и выхода не совпали!"
print("dMHA", dX.shape, '\n')

# Проверка верхнеуровневых функций:
size = (batch, max_tokens)
data = np.random.randint(0, 9, size=size, dtype=np.int32)

# Инференс:
out = call(data)
assert out.shape == (batch, max_tokens + 1), f"Выходной размер не соответствует ожидаемому!"
print("Call generate", out.shape)

# Режим обучения:
out, cache = call(data, data)
assert out.shape == (batch, max_tokens + 1, vocab_size), f"Выходной размер не соответствует ожидаемому!"
print("Call training", out.shape)

# Проверка Loss-функции:
target = np.argmax(softmax(out), axis=-1)
print(target.shape)
loss, grad = SparseCrossEntropy(out, target)
# assert round(float(loss)) == round(np.log(vocab_size)), f"Лосс не совпал с ожидаемым!"
print("Loss ", loss)

# Обратный проход:
grads = backward(out, cache)
assert len(grads) == 6, f"Не все слои получили градиенты!"
print("Backward grads:")
for g in grads:
    print(g.keys())

В будущем его можно закомментировать, так как при изменении кода, некоторые assert могут не сработать.

Подготовка модели к запуску.

Для того чтобы обучить модель, нам понадобится код, который будет управлять: прямым и обратным проходами, вычислением ошибки, оптимизацией и выводом результатов. Он называется fit и в данной версии представляет из себя функцию, которая организует все, что связано с обучением модели.

Внимательно изучите код:

def fit(
        data_train: np.ndarray, data_valid: np.ndarray,
        epoch: int, shuffle: bool = False, step_per_epoch: int = None
) -> None:
    """"""
    # Проверка количества шагов:
    if not step_per_epoch:
        step_per_epoch = data_train.shape[0]

    # Цикл обучения:
    state = dict()
    for i in range(1, epoch + 1):
        # Метрики:
        general_loss_train = 0
        general_loss_valid = 0

        # Тасование батчей:
        if shuffle:
            idx = np.random.permutation(len(data_train))  # Случайный порядок индексов
            data_train = data_train[idx]

        # Обучающая часть:
        for step, (batch, target) in enumerate(data_train[:step_per_epoch], start=1):
            prediction, cache = call(batch, Y=target)

            loss, grad = SparseCrossEntropy(
                prediction,
                add_finish_token(target)
            )

            grad_parameters = backward(grad, cache)

            state = optimizer(parameters, grad_parameters, step, state)        # Оптимизация

            general_loss_train += float(loss)
            print('=', end='')

        # Валидационная часть:
        for batch, target in data_valid:
            prediction, cache = call(batch, Y=target)
            loss, grad = SparseCrossEntropy(prediction, add_finish_token(target))

            general_loss_valid += float(loss)

        # Вывод ошибки:
        general_loss_train /= step_per_epoch
        general_loss_valid /= data_valid.shape[0]

        print(f"\nЭпоха: {i}")
        print(f"Ошибка модели на обучении: {general_loss_train}")
        print(f"Ошибка модели на тесте: {general_loss_valid}")

Данная функция является упрощенной версией метода из моего базового фреймворка, и все же она обладает рядом интересных возможностей:

  • Параметр step_per_epoch в сочетании с shuffle позволяет ограничить данные, подаваемые за одну эпоху. А значит нам не обязательно ждать пока весь датасет пройдет через модель, прежде чем получить промежуточную информацию об ошибке. Это дает гибкие возможности работы с ним.

  • Планировщик позволяет регулировать скорость на каждом шаге через параметры start_rate и finish_rate.

  • Параметр warmup_steps регулирует количество шагов "разогрева" модели перед выходом на стартовую (пиковую) скорость планировщика.

  • Хранение состояний между батчами нужно для корректной работы оптимизатора.

Суть кода проста. Он тасует датасет и берет меньшую его часть для текущей эпохи. Запускается цикл подачи в верхнеуровневый метод call. Прямой вызов возвращает логиты и кэш промежуточных состояний всех слоев. Логиты нужны для вычисления ошибки. Та в свою очередь возвращает значение, нужное лишь для явного вывода результата и градиент по самой себе. Градиент и кэш из forward-а идут в backward для вычисления всех нужных значений для корректировки. Собранные градиенты и список параметров передаются в оптимизатор, который делает шаг спуска. После чего подается валидная часть датасета для измерения ошибки.

Подготовка синтетических данных.

А чему мы будем нашу модель учить?

Для этого я подготовил специальный класс, который содержит в себе набор тестов для создания синтетических данных. Если вы не знаете ООП, это не помешает вам его использовать. В будущем вы сможете написать собственные тесты на его основе.

class Generator:
    def __init__(
            self, batch_size: int,
            number_tokens: int, number_batch: int,
            shuffle: bool = True, test_size: float = .2,
            dtype=np.int32
    ) -> None:
        self.batch_size = batch_size
        self.number_tokens = number_tokens
        self.number_batch = number_batch
        self.shuffle = shuffle
        self.test_size = test_size
        self.dtype = dtype

    def palindrome(self) -> Union[np.ndarray, tuple[np.ndarray, np.ndarray]]:
        """Создание последовательностий с переворотом второй половины"""
        data, target = list(), list()
        self.number_tokens //= 2
        for _ in range(self.number_batch):
            data_batch, target_batch = list(), list()
            for num in range(self.batch_size):
                half = str(random.randint(10 ** (self.number_tokens - 1), 10 ** self.number_tokens - 1))
                reverse = list(half)
                reverse.reverse()
                data_batch.append([int(i) for i in "".join((half, half))])
                target_batch.append([int(i) for i in "".join((half, "".join(reverse)))])
            data.append(data_batch)
            target.append(target_batch)

        data = np.array((data, target), dtype=self.dtype).transpose(1, 0, 2, 3)
        return self.train_test_split(data, self.test_size) if self.shuffle else data

    def pointer_index(self) -> Union[np.ndarray, tuple[np.ndarray, np.ndarray]]:
        """
        Индексация собственной последовательности:
        y_i = x_{x_i}
        """
        data, target = list(), list()

        seq_len = self.number_tokens

        for _ in range(self.number_batch):
            data_batch, target_batch = list(), list()
            for _ in range(self.batch_size):
                x = np.random.randint(0, 10, size=seq_len)
                if seq_len < 10:
                    raise ValueError("seq_len должен быть >= 10")
                y = x[x]
                data_batch.append(x.tolist())
                target_batch.append(y.tolist())
            data.append(data_batch)
            target.append(target_batch)

        data = np.array((data, target), dtype=self.dtype).transpose(1, 0, 2, 3)
        return self.train_test_split(data, self.test_size) if self.shuffle else data

    def train_test_split(self, data: np.ndarray, test_size: float = .2) -> tuple[np.ndarray, np.ndarray]:
        """Разбиение данных"""
        idx = np.random.permutation(len(data))  # Случайный порядок индексов
        data = data[idx]
        index = int(len(data) * (1 - test_size))
        return data[:index], data[index:]

Стартовый тест включает в себя последовательность с двумя одинаковыми половинами. Задача трансформера перевернуть вторую часть, чтобы сделать палиндром.

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 -> 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
0 1 0 2 0 3 0 4 0 1 0 2 0 3 0 4 -> 0 1 0 2 0 3 0 4 4 0 3 0 2 0 1 0

Все очень просто, но все же не настолько, насколько может показаться.

Создаем датасет:

gen = Generator(
    batch_size=batch,
    number_tokens=max_tokens,
    number_batch=256,
    test_size=.33
)

train, valid = gen.palindrome()   # palindrome, pointer_index, castom_test

print("Train shape: ", train.shape)
print("Valid shape: ", valid.shape)

Обучение модели.

Зададим параметры обучения.

Всего у нас будет 10 эпох. За каждую из них модель получит по 64 батча. Начальная скорость 1e-2 будет постепенно снижаться до 1e-5, но перед этим в течении 128 батчей модель будет разогреваться.

epoch = 10
steps_per_epoch = 64  # Количество подаваемых батчей за одну эпоху
start_rate = 1e-2
finish_rate = 1e-5
warmup_steps = 128    # Количество "шагов прогрева"
total_steps = epoch * steps_per_epoch - warmup_steps  # Общее количество шагов

Не забудем про планировщик:

def sheduler(step, warmup_steps=128):
    """Вычисляет скорость на нужно шаге"""
    if step <= warmup_steps:
        return start_rate * step / warmup_steps
    else:
        return (start_rate - finish_rate) * (total_steps - step) / total_steps
    return lr

Теперь запустим цикл обучения.

fit(
    data_train=train, data_valid=valid,
    shuffle=True, step_per_epoch=steps_per_epoch,
    epoch=epoch
)

Если вы видите что-то подобное:
================================================================
Эпоха: 1
Ошибка модели на обучении: 2.267000511288643
Ошибка модели на тесте: 2.12314416660982
================================================================
Эпоха: 2
Ошибка модели на обучении: 1.6724637486040592
Ошибка модели на тесте: 0.30215326687868904

Значит все получилось!

Выводы.

Для ручной проверки результата, я создал функцию predict. Она поможет наглядно увидеть полученный результат:

print("\nВывод: ")
request = np.array([[
    [1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8],
    [8, 7, 6, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1],
    [0, 1, 0, 2, 0, 3, 0, 4, 0, 1, 0, 2, 0, 3, 0, 4],
    [1, 1, 2, 3, 1, 1, 4, 5, 1, 1, 2, 3, 1, 1, 4, 5],
    [0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1],
    [5, 5, 4, 4, 3, 3, 2, 2, 5, 5, 4, 4, 3, 3, 2, 2],
    [7, 7, 7, 7, 8, 8, 9, 9, 7, 7, 7, 7, 8, 8, 9, 9],
    [1, 5, 3, 7, 9, 2, 4, 6, 1, 5, 3, 7, 9, 2, 4, 6],
    [3, 9, 2, 6, 1, 2, 5, 6, 3, 9, 2, 6, 1, 2, 5, 6],
]])

prediction = predict(request)
for r, p in zip(request[0], prediction[0]):
Выводы.    print(f"{r} -> {p}")

Вывод:
[1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8] -> [10 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1]
[8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1] -> [10 8 7 6 5 4 3 2 1 1 2 3 4 5 6 7 8]
[0 1 0 2 0 3 0 4 0 1 0 2 0 3 0 4] -> [10 0 1 0 2 0 3 0 4 4 0 3 0 2 0 1 0]
[1 1 2 3 1 1 4 5 1 1 2 3 1 1 4 5] -> [10 1 1 2 3 1 1 4 5 5 4 1 1 3 2 1 1]
[0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1] -> [10 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0]
[5 5 4 4 3 3 2 2 5 5 4 4 3 3 2 2] -> [10 5 5 4 4 3 3 2 2 2 2 3 3 4 4 5 5]
[7 7 7 7 8 8 9 9 7 7 7 7 8 8 9 9] -> [10 7 7 7 7 8 8 9 9 9 9 8 8 7 7 7 7]
[1 5 3 7 9 2 4 6 1 5 3 7 9 2 4 6] -> [10 1 5 3 7 9 2 4 6 6 4 2 9 7 3 5 1]
[3 9 2 6 1 2 5 6 3 9 2 6 1 2 5 6] -> [10 3 9 2 6 1 2 5 6 6 5 2 1 6 2 9 3]

Тривиальный тест пройден на отлично.

Первый токен в каждой последовательности —10 соответствует техническому токену Start с которого начинается генерация.

Проведем еще один эксперимент. Увеличим длину последовательностей в два раза: max_tokens=32. Увеличим батч и d_model и добьемся лучших показателей ошибки. А за тем в качестве тестовых данных подадим все те же последовательности в 16 токенов:

Вывод:
[1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8] -> [10 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 7 7 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1]
[8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1] -> [10 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 2 2 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8]
[0 1 0 2 0 3 0 4 0 1 0 2 0 3 0 4] -> [10 0 1 0 2 0 3 0 4 0 1 0 2 0 3 0 0 0 0 3 0 2 0 1 0 4 0 3 0 2 0 1 0]
[1 1 2 3 1 1 4 5 1 1 2 3 1 1 4 5] -> [10 1 1 2 3 1 1 4 5 1 1 2 3 1 1 4 4 4 4 1 1 3 2 1 1 5 4 1 1 3 2 1 1]
[0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1] -> [10 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0]
[5 5 4 4 3 3 2 2 5 5 4 4 3 3 2 2] -> [10 5 5 4 4 3 3 2 2 5 5 4 4 3 3 2 2 2 2 3 3 4 4 5 5 2 2 3 3 4 4 5 5]
[7 7 7 7 8 8 9 9 7 7 7 7 8 8 9 9] -> [10 7 7 7 7 8 8 9 9 7 7 7 7 8 8 9 9 9 9 8 8 7 7 7 7 9 9 8 8 7 7 7 7]
[1 5 3 7 9 2 4 6 1 5 3 7 9 2 4 6] -> [10 1 5 3 7 9 2 4 6 1 5 3 7 9 2 4 4 4 4 2 9 7 3 5 1 6 4 2 9 7 3 5 1]
[3 9 2 6 1 2 5 6 3 9 2 6 1 2 5 6] -> [10 3 9 2 6 1 2 5 6 3 9 2 6 1 2 5 5 5 5 2 1 6 2 9 3 6 5 2 1 6 2 9 3]

Удивительно, но трансформер нашел выход из положения, продублировав каждую половину, а за тем перевернул вторую часть, как должно! И это при том, что у нас нет механизма ранней остановки и спец токена Pad. Данный пример раскрывает ту самую обобщающую способность, которую мы ждем от модели в виде умения находить выход из нестандартных ситуаций и работать с данными разной длины.

Разумеется это еще не все. Почему бы нам не задействовать более сложные тесты для того чтобы выжать максимум из данной модели? И почему бы читателю не сделать это самостоятельно в домашнем задании?

Домашнее задание

Для закрепления материала, вы можете выполнить несколько задач.

Задание 1. Дропнутые тензоры.

Реализуйте метод регуляризации Дропаут своими силами.

Пояснение.

Технически вам нужно сделать случайное обнуление значений тензора формы [B T D] по измерению D. Также необходимо кэширование значений и обратная функция, которые должны встроиться в статичный граф (функции call и backward).

Для удобства, вставьте один dropout в call, например перед выходным слоем. Вставьте backward_dropout соответственно после выходного слоя в backward.

Примерная сигнатура:

def dropout(X: np.ndarray, p: float) -> tuple[np.ndarray, dict]:
  """"""
  pass

def backward_dropout(Y: np.ndarray, cache: dict) -> np.ndarray:
  """"""
  pass

Задание 2. Личное тестирование.

Придумайте свой тест для трансформера. Для этого напишите и встройте новый метод в генератор данных.

Пояснение.

Создайте данные сообщений запросов и таргетов, связанных интересной логикой. Она должен быть достаточно проста и хорошо интерпретируема для проверки результата.

Метод должен возвращать два массива (train и valid) стандартной формы: [Строки, Тип сообщения, Размер батча, Длина последовательности], например:

Train.shape: (171, 2, 64, 16)
Valid shape: (85, 2, 64, 16)

Внутри генератора уже имеется метод train_test_split для разделение и тасования данных.

Шаблон метода:

def castom_test(self) -> Union[np.ndarray, tuple[np.ndarray, np.ndarray]]:
    """Короткое описание смысла теста"""

    # --- Ваш код ---
    size = (self.number_batch, self.batch_size, self.number_tokens)
    data = np.ones(size, dtype=self.dtype)
    target = np.ones(size, dtype=self.dtype)
    # ----------------------------------------------------

    data = np.array((data, target), dtype=self.dtype).transpose(1, 0, 2, 3)
    return self.train_test_split(data, self.test_size) if self.shuffle else data

Сейчас в шаблоне задаются два массива с единицами, правильной формы: data и target. Они объединяются в общий массив с перестановкой оси строк на первое место.

Задание 3. Самоиндексация.

В строке с созданием синтетических данных переключите метод генерации с простого palindrome на трансформер-специфичный pointer_index.

Отрегулируйте глобальные параметры и параметры обучения таким образом, чтобы ошибка на тесте упала ниже 5e-1, при параметре max_tokens >= 16 (это единственное ограничение).

Пояснение.

Данный тест создает последовательность, индексируя входную собственными номерами токенов:

Yi = X[Xi]

0 1 2 3 4 5 6 7 8 9 9 9 9 1 2 3 -> 0 1 2 3 4 5 6 7 8 9 9 9 9 1 2 3
5 5 5 5 5 0 9 9 9 1 9 9 5 9 9 6 -> 0 0 0 0 0 5 1 1 1 5 1 1 0 1 1 9
1 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 -> 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1

Это сложный тест, который практически неподъемен для нашего маленького трансформера. Но если применить полученные знания и как следует поработать с параметрами, то задачу можно и нужно выполнить без изменения архитектуры с текущим уровнем глубины в 1 блок.

Совет: используйте GPU.

Послесловие

Мы проделали огромный путь от наивного понимания трансформеров и поверхностного рассмотрения схем к глубокой теории и непосредственной реализации. Теперь вам раскрыта не только идея и логика трансформеров, но и технические нюансы построения архитектуры, стабилизации обучения, а так же генерации сообщений.

По своему опыту могу сказать, что люди обладающие истинным пониманием никогда не прячутся за сложностью формулировок, дипломами и громкими званиями, а показывают свои знания на практике, выражаясь наиболее понятным языком. Чем глубже познание человека, тем легче ему провести деконструкцию и объяснить сложную тему "на пальцах". Надеюсь и у меня это получилось.

Если данная статья будет востребованной, то я напишу уже продвинутый и гораздо более глубокий материал, посвященный своему собственному фреймворку. В нем мы рассмотрим технические нюансы построения динамического графа, реализацию автоградиента, систему остановки генерации сообщений и много чего еще.

Также в этой статье я упомянул множество технологий, которые сами по себе являются интересными темами и заслуживают отдельных статей, например: оптимизаторы и математика СГС, продвинутые методы позиционного кодирования, латентное внимание и тому подобное.

Еще раз скажу, что написать подобную статью — это очень тяжелый и неблагодарный труд. Наверняка, в ней есть неточности, ошибки в тексте и "своеобразный стиль". Давайте исправим их вместе.

Если есть конкретные вопросы по теории и коду, то я отвечу на них.

Ну и в конце ссылка на учебный репозиторий. В нем вы найдете весь код уже собранного трансформера, приложение с дополнительным кодом, а так же шаблоны для задач из домашней работы.


Ссылка на статью создателей трансформера: https://arxiv.org/abs/1706.03762;
Учебный репозиторий: https://github.com/MaxKuzmenko/my-little-transformer/blob/main/Article. DIY Transformer. MaxKuz13.ipynb.

* Все изображения подготовлены мною в GoogleSlides.

Источник

  • 22.06.26 21:51 kimberlyhebert786

    I invested in bitcoin trading After losing $78.4 USDT) linked to a romance fraud scam worth of cryptocurrency through an online investment platform and later discovered it was a scam. After extensive research for recovery options, I contacted CAPITAL CRYPTO RECOVER based on positive client reviews and recommendations. Their professional security team guided me through the recovery process using advanced technology, and I was able to recover my lost cryptocurrency successfully. I am truly grateful for their support and assistance during such a difficult experience. I will advise you to contact CAPITAL CRYPTO RECOVER helped me recover my funds. For anyone facing similar issues, Website: https://recovercapital.wixsite.com/capital-crypto-rec-1 Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text Number: +1 (336) 390-6684

  • 24.06.26 01:25 Fraddy Pual

    I never thought it would happen to me—but I lost $256,100 in Bitcoin through a shady investment deal. I was shattered, panicked, and convinced my savings were gone forever. Just when I was about to give up, I stumbled upon reviews for FUNDSRETRIEVER, a cyber recovery team with a solid reputation. I decided to give it a shot, and to my absolute shock, they recovered every single cent in record time. Working with them was a lifesaver. If you've been tricked by fake investment platforms, don't lose hope—FUNDSRETRIEVER can help. Contact them here: Email: [email protected] | WhatsApp: +1603512144 8| Telegram: @Fundsretriever

  • 24.06.26 01:27 Fraddy Pual

    I never thought it would happen to me—but I lost $256,100 in Bitcoin through a shady investment deal. I was shattered, panicked, and convinced my savings were gone forever. Just when I was about to give up, I stumbled upon reviews for FUNDSRETRIEVER, a cyber recovery team with a solid reputation. I decided to give it a shot, and to my absolute shock, they recovered every single cent in record time. Working with them was a lifesaver. If you've been tricked by fake investment platforms, don't lose hope—FUNDSRETRIEVER can help. Contact them here: Email: [email protected] | WhatsApp: +16035121448 | Telegram: @Fundsretriever

  • 24.06.26 01:28 Fraddy Pual

    I never thought it would happen to me—but I lost $256,100 in Bitcoin through a shady investment deal. I was shattered, panicked, and convinced my savings were gone forever. Just when I was about to give up, I stumbled upon reviews for FUNDSRETRIEVER, a cyber recovery team with a solid reputation. I decided to give it a shot, and to my absolute shock, they recovered every single cent in record time. Working with them was a lifesaver. If you've been tricked by fake investment platforms, don't lose hope—FUNDSRETRIEVER can help. Contact them here: Email: [email protected] | WhatsApp: +16035121448 | Telegram: @Fundsretriever.

  • 24.06.26 01:58 robertalfred175

    CRYPTO SCAM RECOVERY SUCCESSFUL – A TESTIMONIAL OF LOST PASSWORD TO YOUR DIGITAL WALLET BACK. My name is Robert Alfred, Am from Australia. I’m sharing my experience in the hope that it helps others who have been victims of crypto scams. A few months ago, I fell victim to a fraudulent crypto investment scheme linked to a broker company. I had invested heavily during a time when Bitcoin prices were rising, thinking it was a good opportunity. Unfortunately, I was scammed out of $120,000 AUD and the broker denied me access to my digital wallet and assets. It was a devastating experience that caused many sleepless nights. Crypto scams are increasingly common and often involve fake trading platforms, phishing attacks, and misleading investment opportunities. In my desperation, a friend from the crypto community recommended Capital Crypto Recovery Service, known for helping victims recover lost or stolen funds. After doing some research and reading multiple positive reviews, I reached out to Capital Crypto Recovery. I provided all the necessary information—wallet addresses, transaction history, and communication logs. Their expert team responded immediately and began investigating. Using advanced blockchain tracking techniques, they were able to trace the stolen Dogecoin, identify the scammer’s wallet, and coordinate with relevant authorities to freeze the funds before they could be moved. Incredibly, within 24 hours, Capital Crypto Recovery successfully recovered the majority of my stolen crypto assets. I was beyond relieved and truly grateful. Their professionalism, transparency, and constant communication throughout the process gave me hope during a very difficult time. If you’ve been a victim of a crypto scam, I highly recommend them with full confidence contacting: Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text: +1 (336) 390-6684 Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 24.06.26 01:58 robertalfred175

    CRYPTO SCAM RECOVERY SUCCESSFUL – A TESTIMONIAL OF LOST PASSWORD TO YOUR DIGITAL WALLET BACK. My name is Robert Alfred, Am from Australia. I’m sharing my experience in the hope that it helps others who have been victims of crypto scams. A few months ago, I fell victim to a fraudulent crypto investment scheme linked to a broker company. I had invested heavily during a time when Bitcoin prices were rising, thinking it was a good opportunity. Unfortunately, I was scammed out of $120,000 AUD and the broker denied me access to my digital wallet and assets. It was a devastating experience that caused many sleepless nights. Crypto scams are increasingly common and often involve fake trading platforms, phishing attacks, and misleading investment opportunities. In my desperation, a friend from the crypto community recommended Capital Crypto Recovery Service, known for helping victims recover lost or stolen funds. After doing some research and reading multiple positive reviews, I reached out to Capital Crypto Recovery. I provided all the necessary information—wallet addresses, transaction history, and communication logs. Their expert team responded immediately and began investigating. Using advanced blockchain tracking techniques, they were able to trace the stolen Dogecoin, identify the scammer’s wallet, and coordinate with relevant authorities to freeze the funds before they could be moved. Incredibly, within 24 hours, Capital Crypto Recovery successfully recovered the majority of my stolen crypto assets. I was beyond relieved and truly grateful. Their professionalism, transparency, and constant communication throughout the process gave me hope during a very difficult time. If you’ve been a victim of a crypto scam, I highly recommend them with full confidence contacting: Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text: +1 (336) 390-6684 Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 24.06.26 14:16 Universina da Mota

    Becoming a victim of an investment scam is never anyone's intention it often happens because fraudsters exploit trust and a lack of awareness. I would like to express my sincere gratitude to the dedicated team at ResQpro for their professionalism and commitment to helping victims of online investment fraud. Their efforts in assisting individuals with the recovery of stolen assets and holding scammers accountable are truly commendable. If you need assistance or would like to learn more, you can contact them through: Email: [email protected] Alternative Email: [email protected] Telegram: @ResQprofirm WhatsApp: +1 (985) 296-9146

  • 24.06.26 14:21 Elizabeth Thompson

    If you believe you have been the victim of an investment scam, it is important to act promptly and gather all relevant information. Keep records of transaction receipts, wallet addresses, communication logs, account details, and any other evidence related to the incident. Providing accurate documentation can help investigators, financial institutions, legal professionals, or recovery specialists review your case and determine what options may be available. Be cautious of anyone who guarantees the recovery of lost funds or requests large upfront payments. For additional information, you may contact: Email: [email protected] Telegram: @ResQprofirm WhatsApp: +1 (985) 296-9146

  • 24.06.26 15:33 Júlia Castro

    If you have fallen victim to an investment scam, it is important to act quickly and gather all available evidence related to the incident. This may include transaction records, wallet addresses, screenshots of conversations, emails, account details, and any information connected to the individuals or entities involved. Having complete documentation can help professionals assess your situation and explore possible recovery options. Always exercise caution when seeking assistance and carefully verify the credentials of any service provider before proceeding. For further information, you may contact: Email: [email protected] Telegram: @ResQprofirm WhatsApp: +1 (985) 296-9146

  • 24.06.26 22:01 robertalfred175

    CRYPTO SCAM RECOVERY SUCCESSFUL – A TESTIMONIAL OF LOST PASSWORD TO YOUR DIGITAL WALLET BACK. My name is Robert Alfred, Am from Australia. I’m sharing my experience in the hope that it helps others who have been victims of crypto scams. A few months ago, I fell victim to a fraudulent crypto investment scheme linked to a broker company. I had invested heavily during a time when Bitcoin prices were rising, thinking it was a good opportunity. Unfortunately, I was scammed out of $120,000 AUD and the broker denied me access to my digital wallet and assets. It was a devastating experience that caused many sleepless nights. Crypto scams are increasingly common and often involve fake trading platforms, phishing attacks, and misleading investment opportunities. In my desperation, a friend from the crypto community recommended Capital Crypto Recovery Service, known for helping victims recover lost or stolen funds. After doing some research and reading multiple positive reviews, I reached out to Capital Crypto Recovery. I provided all the necessary information—wallet addresses, transaction history, and communication logs. Their expert team responded immediately and began investigating. Using advanced blockchain tracking techniques, they were able to trace the stolen Dogecoin, identify the scammer’s wallet, and coordinate with relevant authorities to freeze the funds before they could be moved. Incredibly, within 24 hours, Capital Crypto Recovery successfully recovered the majority of my stolen crypto assets. I was beyond relieved and truly grateful. Their professionalism, transparency, and constant communication throughout the process gave me hope during a very difficult time. If you’ve been a victim of a crypto scam, I highly recommend them with full confidence contacting: Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text: +1 (336) 390-6684 Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 24.06.26 22:01 robertalfred175

    CRYPTO SCAM RECOVERY SUCCESSFUL – A TESTIMONIAL OF LOST PASSWORD TO YOUR DIGITAL WALLET BACK. My name is Robert Alfred, Am from Australia. I’m sharing my experience in the hope that it helps others who have been victims of crypto scams. A few months ago, I fell victim to a fraudulent crypto investment scheme linked to a broker company. I had invested heavily during a time when Bitcoin prices were rising, thinking it was a good opportunity. Unfortunately, I was scammed out of $120,000 AUD and the broker denied me access to my digital wallet and assets. It was a devastating experience that caused many sleepless nights. Crypto scams are increasingly common and often involve fake trading platforms, phishing attacks, and misleading investment opportunities. In my desperation, a friend from the crypto community recommended Capital Crypto Recovery Service, known for helping victims recover lost or stolen funds. After doing some research and reading multiple positive reviews, I reached out to Capital Crypto Recovery. I provided all the necessary information—wallet addresses, transaction history, and communication logs. Their expert team responded immediately and began investigating. Using advanced blockchain tracking techniques, they were able to trace the stolen Dogecoin, identify the scammer’s wallet, and coordinate with relevant authorities to freeze the funds before they could be moved. Incredibly, within 24 hours, Capital Crypto Recovery successfully recovered the majority of my stolen crypto assets. I was beyond relieved and truly grateful. Their professionalism, transparency, and constant communication throughout the process gave me hope during a very difficult time. If you’ve been a victim of a crypto scam, I highly recommend them with full confidence contacting: Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text: +1 (336) 390-6684 Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 25.06.26 21:13 Emilie Safi

    A fraudulent investment scheme operated by BTCMining.limited functions as a fake return scam. In this setup, scammers lure victims with false promises of high returns. Through manipulative tactics, they gain individuals' trust and convince them to invest, ultimately leading to financial loss. If you have ever faced a cyber threat or fallen victim to an online crypto scam and need to reach the authorities, I recommend contacting [email protected], [email protected], WhatsApp +19852969146, telegram @resqprofirm. They are a legitimate team that helps victims of online crypto scams using advanced tools.

  • 25.06.26 21:25 Emilie Safi

    So I ended up losing $38,000 to this platform. At first, they kept asking me to put in more money so I could get into my portfolio. I did that, but then they wouldn’t let me withdraw anything—just kept asking for more deposits. It got way too suspicious, so I stopped. I found this company called ResQProfirm on Google and told them what happened. They got in touch, asked me to walk them through everything, and I gave them all the proof I had. They did an amazing job tracking down my money and getting it back. Big thanks to them at [email protected] and on WhatsApp at +19852969146. Please be careful out there and always research before investing.

  • 26.06.26 01:04 robertalfred175

    CRYPTO SCAM RECOVERY SUCCESSFUL – A TESTIMONIAL OF LOST PASSWORD TO YOUR DIGITAL WALLET BACK. My name is Robert Alfred, Am from Australia. I’m sharing my experience in the hope that it helps others who have been victims of crypto scams. A few months ago, I fell victim to a fraudulent crypto investment scheme linked to a broker company. I had invested heavily during a time when Bitcoin prices were rising, thinking it was a good opportunity. Unfortunately, I was scammed out of $120,000 AUD and the broker denied me access to my digital wallet and assets. It was a devastating experience that caused many sleepless nights. Crypto scams are increasingly common and often involve fake trading platforms, phishing attacks, and misleading investment opportunities. In my desperation, a friend from the crypto community recommended Capital Crypto Recovery Service, known for helping victims recover lost or stolen funds. After doing some research and reading multiple positive reviews, I reached out to Capital Crypto Recovery. I provided all the necessary information—wallet addresses, transaction history, and communication logs. Their expert team responded immediately and began investigating. Using advanced blockchain tracking techniques, they were able to trace the stolen Dogecoin, identify the scammer’s wallet, and coordinate with relevant authorities to freeze the funds before they could be moved. Incredibly, within 24 hours, Capital Crypto Recovery successfully recovered the majority of my stolen crypto assets. I was beyond relieved and truly grateful. Their professionalism, transparency, and constant communication throughout the process gave me hope during a very difficult time. If you’ve been a victim of a crypto scam, I highly recommend them with full confidence contacting: Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text: +1 (336) 390-6684 Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 26.06.26 01:04 robertalfred175

    CRYPTO SCAM RECOVERY SUCCESSFUL – A TESTIMONIAL OF LOST PASSWORD TO YOUR DIGITAL WALLET BACK. My name is Robert Alfred, Am from Australia. I’m sharing my experience in the hope that it helps others who have been victims of crypto scams. A few months ago, I fell victim to a fraudulent crypto investment scheme linked to a broker company. I had invested heavily during a time when Bitcoin prices were rising, thinking it was a good opportunity. Unfortunately, I was scammed out of $120,000 AUD and the broker denied me access to my digital wallet and assets. It was a devastating experience that caused many sleepless nights. Crypto scams are increasingly common and often involve fake trading platforms, phishing attacks, and misleading investment opportunities. In my desperation, a friend from the crypto community recommended Capital Crypto Recovery Service, known for helping victims recover lost or stolen funds. After doing some research and reading multiple positive reviews, I reached out to Capital Crypto Recovery. I provided all the necessary information—wallet addresses, transaction history, and communication logs. Their expert team responded immediately and began investigating. Using advanced blockchain tracking techniques, they were able to trace the stolen Dogecoin, identify the scammer’s wallet, and coordinate with relevant authorities to freeze the funds before they could be moved. Incredibly, within 24 hours, Capital Crypto Recovery successfully recovered the majority of my stolen crypto assets. I was beyond relieved and truly grateful. Their professionalism, transparency, and constant communication throughout the process gave me hope during a very difficult time. If you’ve been a victim of a crypto scam, I highly recommend them with full confidence contacting: Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text: +1 (336) 390-6684 Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 26.06.26 02:48 Miriam Rocha

    I trusted this platform with $120,000 of my hard-earned money. Then they started asking for more deposits just so I could access my own portfolio. I paid, but every withdrawal request was denied. They kept pushing for more money. I finally stopped it just felt wrong. Desperate, I found ResQProfirm on Google. They didn't just hear me out; they truly listened. I shared all my proof, and they launched an investigation. Thanks to their hard work, they tracked and returned my funds. From the bottom of my heart, thank you to [email protected] and their WhatsApp +19852969146. Please stay safe and always verify a platform before investing

  • 26.06.26 02:52 Miško Bakić

    I got my $232,000 refund thanks to [email protected] and WhatsApp +19852969146. Highly recommended for anyone in a similar situation.

  • 26.06.26 02:56 Asunción Herrera

    A recovery of $48,330 was facilitated by [email protected]. Individuals who have experienced financial fraud may consider contacting this service.

  • 26.06.26 15:05 Riley Stephens

    If withdrawals keep getting denied, stay calm. I went through the same, and this firm helped me recover everything. Their assistance was outstanding. Contact: [ResQProFirm @Gmail|•|com], Telegram: ResQprofirm, WhatsApp: <+198> <5296> <9146>.

  • 26.06.26 15:09 Antonio Riley

    Withdrawal troubles shouldn’t stress you out. I faced a similar problem, and this firm stepped in and recovered my funds. Their support truly mattered. Contact them: [[email protected], ResQprofirm @aol.com], Telegram: ResQprofirm, WhatsApp: +19852969146.

  • 28.06.26 00:37 kimberlyhebertt673

    I invested in bitcoin trading After losing $78.4 USDT) linked to a romance fraud scam worth of cryptocurrency through an online investment platform and later discovered it was a scam. After extensive research for recovery options, I contacted CAPITAL CRYPTO RECOVER based on positive client reviews and recommendations. Their professional security team guided me through the recovery process using advanced technology, and I was able to recover my lost cryptocurrency successfully. I am truly grateful for their support and assistance during such a difficult experience. I will advise you to contact CAPITAL CRYPTO RECOVER helped me recover my funds. For anyone facing similar issues, Website: https://recovercapital.wixsite.com/capital-crypto-rec-1 Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text Number: +1 (336) 390-6684

  • 28.06.26 00:37 kimberlyhebertt673

    I invested in bitcoin trading After losing $78.4 USDT) linked to a romance fraud scam worth of cryptocurrency through an online investment platform and later discovered it was a scam. After extensive research for recovery options, I contacted CAPITAL CRYPTO RECOVER based on positive client reviews and recommendations. Their professional security team guided me through the recovery process using advanced technology, and I was able to recover my lost cryptocurrency successfully. I am truly grateful for their support and assistance during such a difficult experience. I will advise you to contact CAPITAL CRYPTO RECOVER helped me recover my funds. For anyone facing similar issues, Website: https://recovercapital.wixsite.com/capital-crypto-rec-1 Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text Number: +1 (336) 390-6684

  • 29.06.26 11:57 Lisadonato0726

    For 43 years, I struggled with bad credit due to my own poor decisions, and my credit score was around 490. When my girlfriend and I decided to buy a house, a mortgage broker informed us that it would be impossible to secure a mortgage with my credit score. As a result, she referred me to a company called HACK MAVENS CREDIT SPECIALIST, assuring me of their professionalism and ability to assist with credit improvement. Upon contacting them, I was impressed by their professionalism and they assured me that they could help. In less than 6 days, my credit score skyrocketed to 785, and they also successfully resolved issues in my credit report, including the bankruptcy. I am incredibly satisfied with their service and would highly recommend HACK MAVENS CREDIT SPECIALIST for reliable credit repairs. You can reach them at H A C K M A V E N S 5 [AT] G M A I L [DOT] COM or at [+] [1] [2 0 9] [4 1 7] – [1 9 5 7]. Thanks to their help, my girlfriend and I are now proud homeowners.

  • 29.06.26 22:37 riley777

    Back in 2025, I watched my life savings vanish. A thief took every cent. I felt desperate and went looking for a way to get it back. I found a guy here who said he was an expert haha. He talked about special software that could find my missing cash. I trusted him. That was a big mistake. He was just another scammer. I paid him a software fee and then he just stopped answering my texts and ran off with my money too. I felt so ashamed that I kept quiet about it for months. It is hard to admit you got fooled twice. Later on, I found a real pro. she did not use a fancy sales pitch. she just looked at the trans screenshots and followed the path the money took. she worked fast and got my funds back into my account. Having that money back changed everything. I can sleep again. her info; [email protected]. Call/chatroom on Whtasapp/ +44 7476618364.

  • 30.06.26 15:08 wendytaylor015

    My name is Wendy Taylor, I'm from Los Angeles, i want to announce to you Viewer how Capital Crypto Recover help me to restore my Lost Bitcoin, I invested with a Crypto broker without proper research to know what I was hoarding my hard-earned money into scammers, i lost access to my crypto wallet or had your funds stolen? Don’t worry Capital Crypto Recover is here to help you recover your cryptocurrency with cutting-edge technical expertise, With years of experience in the crypto world, Capital Crypto Recover employs the best latest tools and ethical hacking techniques to help you recover lost assets, unlock hacked accounts, Whether it’s a forgotten password, Capital Crypto Recover has the expertise to help you get your crypto back. a security company service that has a 100% success rate in the recovery of crypto assets, i lost wallet and hacked accounts. I provided them the information they requested and they began their investigation. To my surprise, Capital Crypto Recover was able to trace and recover my crypto assets successfully within 24hours. Thank you for your service in helping me recover my $647,734 worth of crypto funds and I highly recommend their recovery services, they are reliable and a trusted company to any individuals looking to recover lost money. Contact email [email protected] OR Telegram @Capitalcryptorecover Call/Text Number +1 (336)390-6684 his contact: [email protected] His website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 30.06.26 15:08 wendytaylor015

    My name is Wendy Taylor, I'm from Los Angeles, i want to announce to you Viewer how Capital Crypto Recover help me to restore my Lost Bitcoin, I invested with a Crypto broker without proper research to know what I was hoarding my hard-earned money into scammers, i lost access to my crypto wallet or had your funds stolen? Don’t worry Capital Crypto Recover is here to help you recover your cryptocurrency with cutting-edge technical expertise, With years of experience in the crypto world, Capital Crypto Recover employs the best latest tools and ethical hacking techniques to help you recover lost assets, unlock hacked accounts, Whether it’s a forgotten password, Capital Crypto Recover has the expertise to help you get your crypto back. a security company service that has a 100% success rate in the recovery of crypto assets, i lost wallet and hacked accounts. I provided them the information they requested and they began their investigation. To my surprise, Capital Crypto Recover was able to trace and recover my crypto assets successfully within 24hours. Thank you for your service in helping me recover my $647,734 worth of crypto funds and I highly recommend their recovery services, they are reliable and a trusted company to any individuals looking to recover lost money. Contact email [email protected] OR Telegram @Capitalcryptorecover Call/Text Number +1 (336)390-6684 his contact: [email protected] His website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 02.07.26 01:22 Lieneke Bonnema

    I highly recommend ResQprofirm for their professional asset recovery services of my $120,000 scammed funds. Their expertise, professionalism, and commitment to achieving results make them a reliable choice for anyone seeking dependable recovery assistance. [email protected], WhatsApp +19852969146, telegram @resqprofirm

  • 02.07.26 01:26 Clara Morin

    I want to extend my deepest appreciation for showing that circumstances do not define one’s potential for greatness. Your support has been a major source of inspiration during my trading journey, and I am sincerely grateful for your insight and mentorship. Thank you so much. [email protected], WhatsApp +19852969146, telegram ResQprofirm

  • 02.07.26 01:31 Robin Hale

    I sincerely want to thank you for demonstrating that anyone can rise above their circumstances and achieve success. Your constant support has been incredibly inspiring during my trading journey, and your wisdom and advice mean so much to me. I appreciate you deeply. [email protected], WhatsApp +19852969146, telegram Resqprofirm

  • 04.07.26 15:32 Fraddy Pual

    There are few companies I trust as much as FUNDSRETRIEVER. When I lost $653,000 in Ethereum to a ruthless scam, I thought my life would never be the same. The betrayal cut deep, but I refused to give up. I searched tirelessly for a legitimate way to recover what was stolen, and finally found FUNDSRETRIEVER—the most competent and compassionate recovery team I could have imagined. They handled my case with precision and care, and in the end, my entire ETH wallet was restored. More than the money, they gave me back my hope and happiness. I'm sharing my story because I want others to know that recovery is possible. If a scam has taken from you, don't hesitate—contact FUNDSRETRIEVER today. Email: FUNDSRETRIEVER1@ Gmail.com | WhatsApp: +1 603-512-1448 | Telegram: @FUNDSRETRIEVER

  • 05.07.26 14:44 lydiassmith567

    HIRE A HACKER YOUR STOLEN CRYPTO RECOVERY / BTC / USDT / ETH WITH THE HELP OF CAPITAL CRYPTO RECOVER. I want to share my experience publicly regarding cryptocurrency wallet recovery, I highly recommend you to contact CAPITAL CRYPTO RECOVER, a professional private investigator in the Bitcoin world. They have a certified expert security team specializing in Bitcoin Recovery Services and have helped many people worldwide recover their lost funds. My wife and I were defrauded by an online manipulator posing as an experienced crypto investment professional. We lost $9.2 Million Stolen BTC in cryptocurrency and were left feeling homeless. After spending hours searching for a reliable crypto recovery service, I discovered CAPITAL CRYPTO RECOVER online. By patiently explaining my situation to their team, I was able to recover all my funds. Remarkably, my money was returned to my wallet in less than 24 hours. I am extremely grateful to CAPITAL CRYPTO RECOVER for their excellent assistance—they truly were a godsend in my difficult situation. If you have fallen victim to a cryptocurrency scam, you can reach CAPITAL CRYPTO RECOVER through the following channels Email: [email protected] OR Call/Text: +1 (336) 390-6684 Contact: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 05.07.26 14:44 lydiassmith567

    HIRE A HACKER YOUR STOLEN CRYPTO RECOVERY / BTC / USDT / ETH WITH THE HELP OF CAPITAL CRYPTO RECOVER. I want to share my experience publicly regarding cryptocurrency wallet recovery, I highly recommend you to contact CAPITAL CRYPTO RECOVER, a professional private investigator in the Bitcoin world. They have a certified expert security team specializing in Bitcoin Recovery Services and have helped many people worldwide recover their lost funds. My wife and I were defrauded by an online manipulator posing as an experienced crypto investment professional. We lost $9.2 Million Stolen BTC in cryptocurrency and were left feeling homeless. After spending hours searching for a reliable crypto recovery service, I discovered CAPITAL CRYPTO RECOVER online. By patiently explaining my situation to their team, I was able to recover all my funds. Remarkably, my money was returned to my wallet in less than 24 hours. I am extremely grateful to CAPITAL CRYPTO RECOVER for their excellent assistance—they truly were a godsend in my difficult situation. If you have fallen victim to a cryptocurrency scam, you can reach CAPITAL CRYPTO RECOVER through the following channels Email: [email protected] OR Call/Text: +1 (336) 390-6684 Contact: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 06.07.26 16:20 Olga Ognjanović

    Having trouble withdrawing funds from an investment platform? ResQprofirm provides fund recovery assistance for individuals seeking help with investment-related disputes. I reached out to them after experiencing problems with an investment platform, and I appreciated their professionalism and support throughout the process. If you're facing a similar situation, act promptly, keep records of your transactions and communications, and seek assistance from a qualified recovery service or the appropriate authorities. Contact: Email: [email protected] Telegram: @ResQprofirm WhatsApp: +1 985 296 9146

  • 06.07.26 16:31 Joseph Weigl

    Invest wisely and stay cautious. Don't be influenced by promises of unusually high returns or convincing sales pitches from brokers. I learned this the hard way after falling victim to an investment scam that promised huge profits. Fortunately, I acted quickly and reported the incident to a recovery firm for assistance. Contact: Email: [email protected] Telegram: @Resqprofirm WhatsApp: +1 985 296 9146

  • 06.07.26 16:33 Jaran Løvlien

    A heartfelt thank you to RESQPRO FIRM for their commitment and professionalism throughout the investigation of my case. Their team worked diligently and helped recover assets valued at $88,000, which were returned to my wallet. I truly appreciate their support, clear communication, and dedication, and I'm grateful for the assistance I received. Contact: Email: [email protected] Telegram: @Resqprofirm WhatsApp: +1 985 296 9146

  • 07.07.26 18:00 robertalfred175

    CRYPTO SCAM RECOVERY SUCCESSFUL – A TESTIMONIAL OF LOST PASSWORD TO YOUR DIGITAL WALLET BACK. My name is Robert Alfred, Am from Australia. I’m sharing my experience in the hope that it helps others who have been victims of crypto scams. A few months ago, I fell victim to a fraudulent crypto investment scheme linked to a broker company. I had invested heavily during a time when Bitcoin prices were rising, thinking it was a good opportunity. Unfortunately, I was scammed out of $120,000 AUD and the broker denied me access to my digital wallet and assets. It was a devastating experience that caused many sleepless nights. Crypto scams are increasingly common and often involve fake trading platforms, phishing attacks, and misleading investment opportunities. In my desperation, a friend from the crypto community recommended Capital Crypto Recovery Service, known for helping victims recover lost or stolen funds. After doing some research and reading multiple positive reviews, I reached out to Capital Crypto Recovery. I provided all the necessary information—wallet addresses, transaction history, and communication logs. Their expert team responded immediately and began investigating. Using advanced blockchain tracking techniques, they were able to trace the stolen Dogecoin, identify the scammer’s wallet, and coordinate with relevant authorities to freeze the funds before they could be moved. Incredibly, within 24 hours, Capital Crypto Recovery successfully recovered the majority of my stolen crypto assets. I was beyond relieved and truly grateful. Their professionalism, transparency, and constant communication throughout the process gave me hope during a very difficult time. If you’ve been a victim of a crypto scam, I highly recommend them with full confidence contacting: Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text: +1 (336) 390-6684 Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 07.07.26 18:01 robertalfred175

    CRYPTO SCAM RECOVERY SUCCESSFUL – A TESTIMONIAL OF LOST PASSWORD TO YOUR DIGITAL WALLET BACK. My name is Robert Alfred, Am from Australia. I’m sharing my experience in the hope that it helps others who have been victims of crypto scams. A few months ago, I fell victim to a fraudulent crypto investment scheme linked to a broker company. I had invested heavily during a time when Bitcoin prices were rising, thinking it was a good opportunity. Unfortunately, I was scammed out of $120,000 AUD and the broker denied me access to my digital wallet and assets. It was a devastating experience that caused many sleepless nights. Crypto scams are increasingly common and often involve fake trading platforms, phishing attacks, and misleading investment opportunities. In my desperation, a friend from the crypto community recommended Capital Crypto Recovery Service, known for helping victims recover lost or stolen funds. After doing some research and reading multiple positive reviews, I reached out to Capital Crypto Recovery. I provided all the necessary information—wallet addresses, transaction history, and communication logs. Their expert team responded immediately and began investigating. Using advanced blockchain tracking techniques, they were able to trace the stolen Dogecoin, identify the scammer’s wallet, and coordinate with relevant authorities to freeze the funds before they could be moved. Incredibly, within 24 hours, Capital Crypto Recovery successfully recovered the majority of my stolen crypto assets. I was beyond relieved and truly grateful. Their professionalism, transparency, and constant communication throughout the process gave me hope during a very difficult time. If you’ve been a victim of a crypto scam, I highly recommend them with full confidence contacting: Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text: +1 (336) 390-6684 Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 09.07.26 19:06 Toivo Walli

    I lost 8.56btc to a fake Bitcoin mining site, I tried withdrawing but couldn't approved my process, I reported to !R£SQPROFIRM! via °R£SQproFirm°àt°gmail•com° °tEL£°gram=R£SQprofirm °whaT°Zap+198°52°96°91°46

  • 09.07.26 19:10 Misty Alexander

    Ongoing messages demanding more money before approving withdrawals are a major red flag. Stop engaging and report the incident to a trusted re­covery team. For professional support, you can contact R£sQprofirm using °ResQproFirm°àt°g,*ma'il(•)¢m°, TEL£gram ResQprofirm, or |whaTZap| +1-985-296-9146.

  • 09.07.26 19:13 Clara Soto

    Anyone receiving continued requests for additional deposits from a scam platform should immediately cut off communication and submit the case to a reputable re­covery service for investigation. R£sQprofirm is a dependable firm you can reach at °ResQproFirm°àt°g,*ma'il(•)¢om°, TEL£gram ResQprofirm, or |whaTZap| +1-985-296-9146.

  • 12.07.26 03:30 Kora Baltacha

    Time is critical. Act now by reaching out to a reputable, seasoned recovery specialist who will guide you every step of the way. You'll need to submit transaction proof, scammer details, and any other useful information. Armed with this, the experts can trace and attempt to pull your money back from the scammers' hidden accounts or wallets. Best of all, R£sQprofirm provides recovery help without charging any upfront fees. Contact them immediately via Telegram @ResQprofirm, WhatsApp +19852969146, or email [email protected].

  • 12.07.26 03:33 Pahal Mathew

    It's important to move proactively by engaging an experienced recovery specialist. They will assist you throughout the process. To help them, provide: · Transaction evidence · Scammer information · Any additional relevant details The experts will then track and try to retrieve your funds from the scammers' hidden accounts or wallets. R£sQprofirm offers recovery assistance with no upfront fees. Contact: Telegram: @ResQprofirm WhatsApp: +19852969146 Email: [email protected]

  • 13.07.26 23:49 [email protected]

    One of the biggest concerns I have about cryptocurrency is the lack of regulation. It creates opportunities for scammers to invent convincing stories and fraudulent investment schemes. Unfortunately, some social media platforms continue to display these ads because they profit from them, even after users report them.I personally clicked on a Facebook advertisement for a company called Chickenfastmining and ended up losing more than $120,000 in a scam. I reported the ad, but nothing was done. Later, through a Reddit community, I found a recovery service called CYBERBERSPY that, in my personal experience, they helped me recover $110,000 of my lost funds. If you've been a victim of a cryptocurrency scam, don't lose hope. Explore your options carefully, and always verify the legitimacy of any recovery service before trusting them or paying any fees. Based on my own experience, CYBERBERSPY was helpful to me and i was able to recover my funds back, but I encourage everyone to do their own research before using any recovery service.i highly recommend: ([email protected])

  • 15.07.26 11:53 Sarah Green

    Thank you for showing that success is possible regardless of where someone starts. Your encouragement, valuable advice, and continuous support have inspired me throughout my $160,457k crypto investment recovery journey. I truly appreciate your kindness and dedication. Resqprofirm @gmail.com Telegram: Resqprofirm

  • 15.07.26 11:58 Lily Gagné

    I sincerely appreciate you for proving that anyone can overcome challenges and achieve success. Your unwavering support throughout my trading investment scam of $88,890 recovery journey has been truly inspiring, and your guidance and wisdom have meant a great deal to me. Thank you for everything ResQprofirm@ gmail.com, ResQprofirm on the telegram.

  • 16.07.26 21:38 patricialovick86

    How To Recover Your Bitcoin Without Falling Victim To Scams: A  Testimony Experience With Capital Crypto Recover Services, Contact Telegram: @Capitalcryptorecover Dear Everyone, I would like to take a moment to share my positive experience with Capital Crypto Recover Services. Initially, I was unsure if it would be possible to recover my stolen bitcoins. However, with their expertise and professionalism, I was able to fully recover my funds. Unfortunately, many individuals fall victim to scams in the cryptocurrency space, especially those involving fraudulent investment platforms. However, I advise caution, as not all recovery services are legitimate. I personally lost $273,000 worth of Bitcoin from my Binance account due to a deceptive platform. If you have suffered a similar loss, you may be considering crypto recovery, The Capital Crypto Recover is the most knowledgeable and effective Capital Crypto Recovery Services assisted me in recovering my stolen funds within 24 hours, after getting access to my wallet. Their service was not only prompt but also highly professional and effective, and many recovery services may not be trustworthy. Therefore, I highly recommend Capital Crypto Recover to you. i do always research and see reviews about their service, For assistance finding your misplaced cryptocurrency, get in touch with them, They do their jobs quickly and excellently, Stay safe and vigilant in the crypto world. Contact: [email protected]  You can reach them via email at [email protected] OR Call/Text Number +1 (336)390-6684 his contact website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 16.07.26 21:38 patricialovick86

    How To Recover Your Bitcoin Without Falling Victim To Scams: A  Testimony Experience With Capital Crypto Recover Services, Contact Telegram: @Capitalcryptorecover Dear Everyone, I would like to take a moment to share my positive experience with Capital Crypto Recover Services. Initially, I was unsure if it would be possible to recover my stolen bitcoins. However, with their expertise and professionalism, I was able to fully recover my funds. Unfortunately, many individuals fall victim to scams in the cryptocurrency space, especially those involving fraudulent investment platforms. However, I advise caution, as not all recovery services are legitimate. I personally lost $273,000 worth of Bitcoin from my Binance account due to a deceptive platform. If you have suffered a similar loss, you may be considering crypto recovery, The Capital Crypto Recover is the most knowledgeable and effective Capital Crypto Recovery Services assisted me in recovering my stolen funds within 24 hours, after getting access to my wallet. Their service was not only prompt but also highly professional and effective, and many recovery services may not be trustworthy. Therefore, I highly recommend Capital Crypto Recover to you. i do always research and see reviews about their service, For assistance finding your misplaced cryptocurrency, get in touch with them, They do their jobs quickly and excellently, Stay safe and vigilant in the crypto world. Contact: [email protected]  You can reach them via email at [email protected] OR Call/Text Number +1 (336)390-6684 his contact website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 17.07.26 19:24 laimqq90

    I recommend Marie when it comes to recovering lost/stolen ust/bitcoin or any kind of cryptocurrencies' from fake investment platforms because they're well specialized in that area and you'll get your money back in full. I can boldly say this right now based on my prior deal i had with them; she was the only one who was able to recover my lost money $52,760 dollars back to my account, Only * ([email protected] and WhatsApp +1 7127594675 successful in recovering my money. They are the only one who can fully restore your lost funds to your account without any deductions, I really value their work and am recommending her to you today. THANK ME LATER

  • 17.07.26 20:12 martinsjude080

    Needs Online Fraud Help Contact Mighty Hacker Recovery https://mightyhackarrecovery.com I lost $292,900 in Bitcoin after investing with an online mining company. After realizing I had been scammed, I spent a long time searching for ways to recover my funds and contacted several services without success. During my research, I came across Mighty Hacker Recovery through Google and YouTube. What caught my attention was that they said they would not require any upfront payment before providing their recovery service. I decided to contact them to discuss my case and understand their process. Throughout the process, they kept me informed about the progress. After several days, I was asked to provide my Bitcoin wallet address, and my case was concluded. Their fee was handled after the service rather than being requested in advance. If you've been the victim of a cryptocurrency scam, it's important to do your own research, ask questions, and carefully evaluate any recovery service before proceeding. Every case is different, so take the time to verify information and understand the process before making any decisions. For Bitcoin scam recovery, cryptocurrency scam, crypto recovery service, recover stolen Bitcoin, Bitcoin fraud help, blockchain investigation, crypto wallet recovery, online investment scam, digital asset recovery, and crypto scam support. Contact Them on WhatsApp +1 (343) 947-3496 or [email protected] or [email protected] or https://mightyhackarrecovery.com Scam recovery Online fraud help Scam alert Report fraud Fraud investigation Fake website checker Scam checker Identity theft protection Consumer protection Chargeback for scam Wire transfer scam Tech support scam Employment scam Rental scam Shopping scam Email scam WhatsApp scam Telegram scam Facebook scam Instagram scam

  • 18.07.26 17:12 Malthe Larsen

    My experience with OKX has been deeply frustrating. For months, my account withdrawals were restricted with no explanation or resolution. Multiple emails to their support team were ignored, leaving me without answers or reassurance. This complete lack of communication shattered my trust. I ultimately regained access to my funds only through the help of a third-party recovery service, ResQProfirm. What should have been a reliable platform instead made me feel helpless and cut off from my own assets. [email protected], WhatsApp +19852969146, telegram @Resqprofirm

  • 18.07.26 17:42 پریا رضایی

    OKX has been a major disappointment. My withdrawals were restricted for months, and repeated attempts to contact support went unanswered. This silence destroyed my confidence in the platform. I was only able to recover my funds through a third-party service, ResQProfirm. I trusted OKX for its reliability, but the experience left me feeling trapped and helpless. Timely communication and access to one’s own money should be a basic standard. [email protected], WhatsApp +19852969146, telegram: ResQprofirm

  • 18.07.26 17:46 Adem Akışık

    I truly didn’t expect such an outstanding outcome. Recovering my $49,360 felt impossible at first, but ResQprofirm’s dedication and persistence made it happen. I hold their team in the highest regard. [email protected], WhatsApp +19852969146

  • 18.07.26 23:51 bernalzenaida

    WhatsApp https://wa.link/fhle97 Telegram https://msng.link/o?@techcyberforc=tg As cryptocurrency continues to reshape global finance, cybercriminals are finding new ways to exploit investors through scams, hacks, phishing attacks, fake investment platforms, and other forms of digital asset fraud. For many victims, knowing where to turn after a loss can be one of the biggest challenges. Techy Force Cyber Retrieval was founded with one clear mission: to give victims of crypto fraud a fighting chance through professional blockchain investigations and cybersecurity expertise. Our team brings together experienced blockchain analysts, digital forensic specialists, cybersecurity professionals, and legal partners who work collaboratively to investigate cryptocurrency-related crimes. Using advanced blockchain forensic tools and global investigative techniques, we analyze transaction histories, trace digital asset movements where possible, identify valuable investigative leads, and prepare evidence that may assist clients and the appropriate authorities. We believe blockchain should represent transparency, accountability, and trust—not fear. That’s why we’re committed to helping victims understand their options, navigate the investigative process, and take informed action after cryptocurrency fraud. Every case is different, and while no legitimate recovery service can promise a successful recovery, acting quickly and working with experienced professionals can improve the quality of an investigation. At Techy Force Cyber Retrieval, we do more than investigate digital crimes—we advocate for victims, pursue the facts, and help people regain confidence after cryptocurrency fraud. WhatsApp https://wa.link/fhle97 Telegram https://msng.link/o?@techcyberforc=tg Crypto fraud doesn’t have to be the end of the road. It’s where our investigation begins.

  • 19.07.26 04:10 Fraddy Pual

    I can't thank Fundsretriever enough for everything they did for me. My name is Vanessa Conway, and I'm here to tell you my story of how I recovered money I never thought I'd see again. A few months ago, I put a significant amount of money into what looked like a genuine online investment company. At first, it felt real—they showed me fake profits and convinced me to invest even more. But when I tried to cash out, they went quiet and started asking for extra fees. That's when it hit me—I had been scammed. I was heartbroken, frustrated, and didn't know where to turn. That money was my savings—months of hard work gone. Then I found Fundsretriever online. I reached out, hoping for a miracle. Right away, their team made me feel heard. They were responsive, knowledgeable, and walked me through everything. They didn't just take my case—they took it seriously and kept me in the loop every step of the way. I finally felt like I had real experts fighting for me. And guess what? They actually got my money back. It wasn't instant, and it took teamwork, but it happened. When I saw those funds returned, I cried with joy. I'm sharing this so that anyone else out there who's been scammed knows—don't lose hope. Do your research before investing, and stay far away from platforms that promise too much too fast. And if you've already been stung, don't wait—get professional help immediately. Thank you, Fundsretriever, from the bottom of my heart. You didn't just recover my money—you restored my faith. — Vanessa Conway 📧 [email protected] 📱 WhatsApp: +16035121448 💬 Telegram: @Fundsretriever

  • 19.07.26 19:53 kimberlyhebertt6877

    I invested in bitcoin trading After losing $78.4 USDT) linked to a romance fraud scam worth of cryptocurrency through an online investment platform and later discovered it was a scam. After extensive research for recovery options, I contacted CAPITAL CRYPTO RECOVER based on positive client reviews and recommendations. Their professional security team guided me through the recovery process using advanced technology, and I was able to recover my lost cryptocurrency successfully. I am truly grateful for their support and assistance during such a difficult experience. I will advise you to contact CAPITAL CRYPTO RECOVER helped me recover my funds. For anyone facing similar issues, Website: https://recovercapital.wixsite.com/capital-crypto-rec-1 Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text Number: +1 (336) 390-6684

  • 19.07.26 19:53 kimberlyhebertt6877

    I invested in bitcoin trading After losing $78.4 USDT) linked to a romance fraud scam worth of cryptocurrency through an online investment platform and later discovered it was a scam. After extensive research for recovery options, I contacted CAPITAL CRYPTO RECOVER based on positive client reviews and recommendations. Their professional security team guided me through the recovery process using advanced technology, and I was able to recover my lost cryptocurrency successfully. I am truly grateful for their support and assistance during such a difficult experience. I will advise you to contact CAPITAL CRYPTO RECOVER helped me recover my funds. For anyone facing similar issues, Website: https://recovercapital.wixsite.com/capital-crypto-rec-1 Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text Number: +1 (336) 390-6684

  • 19.07.26 19:54 kimberlyhebertt6877

    I invested in bitcoin trading After losing $78.4 USDT) linked to a romance fraud scam worth of cryptocurrency through an online investment platform and later discovered it was a scam. After extensive research for recovery options, I contacted CAPITAL CRYPTO RECOVER based on positive client reviews and recommendations. Their professional security team guided me through the recovery process using advanced technology, and I was able to recover my lost cryptocurrency successfully. I am truly grateful for their support and assistance during such a difficult experience. I will advise you to contact CAPITAL CRYPTO RECOVER helped me recover my funds. For anyone facing similar issues, Website: https://recovercapital.wixsite.com/capital-crypto-rec-1 Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text Number: +1 (336) 390-6684

  • 30.07.26 00:04 Ahmed

    A really cool analysis, thank you. I was especially struck by how strictly the order is defined: data processing and formatting come first, with color only at the very end. This really saves you from the typical mistake of "first a pretty palette, then we figure out what the chart is for." And the palette validator with OKLCH + colorblindness check is absolutely fantastic; you almost never see that in regular tools. By the way, while reading about rank-trajectory and the logarithmic scale, I immediately remembered how convenient it is to analyze dynamics on charts in ExpertOption—I've been trading there for quite some time now. When the data is well visualized, decisions are noticeably easier and more relaxed. I also liked the point about "no more than eight colors" and the dual-axis ban. Strict restrictions sometimes actually produce better results than complete freedom. I'll try this approach myself.

  • 30.07.26 17:27 wendytaylor015

    My name is Wendy Taylor, I'm from Los Angeles, i want to announce to you Viewer how Capital Crypto Recover help me to restore my Lost Bitcoin, I invested with a Crypto broker without proper research to know what I was hoarding my hard-earned money into scammers, i lost access to my crypto wallet or had your funds stolen? Don’t worry Capital Crypto Recover is here to help you recover your cryptocurrency with cutting-edge technical expertise, With years of experience in the crypto world, Capital Crypto Recover employs the best latest tools and ethical hacking techniques to help you recover lost assets, unlock hacked accounts, Whether it’s a forgotten password, Capital Crypto Recover has the expertise to help you get your crypto back. a security company service that has a 100% success rate in the recovery of crypto assets, i lost wallet and hacked accounts. I provided them the information they requested and they began their investigation. To my surprise, Capital Crypto Recover was able to trace and recover my crypto assets successfully within 24hours. Thank you for your service in helping me recover my $647,734 worth of crypto funds and I highly recommend their recovery services, they are reliable and a trusted company to any individuals looking to recover lost money. Contact email [email protected] OR Telegram @Capitalcryptorecover Call/Text Number +1 (336)390-6684 his contact: [email protected] His website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 30.07.26 17:27 wendytaylor015

    My name is Wendy Taylor, I'm from Los Angeles, i want to announce to you Viewer how Capital Crypto Recover help me to restore my Lost Bitcoin, I invested with a Crypto broker without proper research to know what I was hoarding my hard-earned money into scammers, i lost access to my crypto wallet or had your funds stolen? Don’t worry Capital Crypto Recover is here to help you recover your cryptocurrency with cutting-edge technical expertise, With years of experience in the crypto world, Capital Crypto Recover employs the best latest tools and ethical hacking techniques to help you recover lost assets, unlock hacked accounts, Whether it’s a forgotten password, Capital Crypto Recover has the expertise to help you get your crypto back. a security company service that has a 100% success rate in the recovery of crypto assets, i lost wallet and hacked accounts. I provided them the information they requested and they began their investigation. To my surprise, Capital Crypto Recover was able to trace and recover my crypto assets successfully within 24hours. Thank you for your service in helping me recover my $647,734 worth of crypto funds and I highly recommend their recovery services, they are reliable and a trusted company to any individuals looking to recover lost money. Contact email [email protected] OR Telegram @Capitalcryptorecover Call/Text Number +1 (336)390-6684 his contact: [email protected] His website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 31.07.26 16:21 rssllhrnsb

    I learned an important lesson after investing in what appeared to be a genuine opportunity. Unfortunately, I was unable to access my funds, which reinforced the importance of carrying out thorough due diligence, checking whether an investment is appropriately regulated, and seeking qualified professional advice rather than relying solely on online reviews or testimonials. During the process of addressing my case, I worked with Mrs. Doris Ashley, who communicated clearly, provided regular updates, and handled the matter in a professional manner. According to my experience, I have recovered $50,000 so far, while efforts to resolve the remaining balance are still in progress. If you wish to contact her, the details I used are: Mrs. Tatiana Sorina
TEXT : (tatianasorina06 at G.Ma IL ..c 0 m ) Before committing money to any investment, take time to verify the legitimacy of the platform, confirm any relevant regulatory authorisations, and avoid investing more than you can comfortably afford to lose.

  • 01.08.26 15:05 keithwilson9899

    ETHEREUM RECOVERY ASSISTANCE: CAPITAL CRYPTO RECOVER HELPED ME RECOVER $98,000 WORTH OF LOST ETH In cases of cryptocurrency scams, having accurate information and trusted support is essential. I would like to recommend Capital Crypto Recover Service, a professional team that specializes in assisting individuals with the recovery of lost or stolen Bitcoin and Ethereum (ETH). Their experienced experts are dedicated to helping victims of digital asset fraud by carefully analyzing each case, developing strategic recovery plans, Capital Crypto Recover Service knowledgeable team's primary goals are to satisfy clients and offer significant support and working diligently toward fund retrieval. The team is committed to providing reliable assistance and maintaining a high level of client satisfaction. Based on my assessment, their reputation professionalism and a strong commitment to their clients. If you have experienced a cryptocurrency loss, you can contacting them for further assistance Phone (Call/Text): +1 (336) 390-6684 Email: [email protected] Alternate Email: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 01.08.26 15:05 keithwilson9899

    ETHEREUM RECOVERY ASSISTANCE: CAPITAL CRYPTO RECOVER HELPED ME RECOVER $98,000 WORTH OF LOST ETH In cases of cryptocurrency scams, having accurate information and trusted support is essential. I would like to recommend Capital Crypto Recover Service, a professional team that specializes in assisting individuals with the recovery of lost or stolen Bitcoin and Ethereum (ETH). Their experienced experts are dedicated to helping victims of digital asset fraud by carefully analyzing each case, developing strategic recovery plans, Capital Crypto Recover Service knowledgeable team's primary goals are to satisfy clients and offer significant support and working diligently toward fund retrieval. The team is committed to providing reliable assistance and maintaining a high level of client satisfaction. Based on my assessment, their reputation professionalism and a strong commitment to their clients. If you have experienced a cryptocurrency loss, you can contacting them for further assistance Phone (Call/Text): +1 (336) 390-6684 Email: [email protected] Alternate Email: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 03.08.26 20:05 Philip

    I was a victim of a crypto theft involving a Pink Drainer, which resulted in the theft of my Wrapped Bitcoin (WBTC) from my Polygon network. The experience was incredibly frustrating and distressing, as I had no idea how to recover my funds. Unfortunately, by the time I noticed the theft, the funds had already been drained to an address that I had no control over, making it seem like an irreversible situation.The attack happened when I clicked on what appeared to be a legitimate link. I didn’t realize at the time that it was a phishing attempt designed to siphon off my private keys and access my wallet. The Pink Drainer, a type of malicious script used by attackers, is specifically designed to exploit such vulnerabilities in crypto wallets. The moment I realized that my WBTC had been drained from my Polygon network. I felt completely helpless, as I didn’t have direct access to the thief's address, and there was no way to reverse the transaction on my own at that point, I started searching for ways to recover my funds, but most resources only offered generic advice that wasn’t practical in this particular case. I quickly realized that if I wanted to have any hope of getting my assets back, I would need professional assistance. After some research, I came across a reliable and trusted recovery team called Aspen Recovery Experts. Their expertise in cryptocurrency recovery, especially in cases like mine, seemed promising.I decided to reach out to Aspen Recovery Experts, and I’m incredibly grateful that I did. Their team of crypto recovery experts was able to help me trace the stolen funds and identify the path the funds took after they left my wallet. Using advanced tools and techniques, they were able to track the transactions on the blockchain, helping me understand where my WBTC had been sent. More importantly, they worked tirelessly to assist me in contacting the necessary parties and even interfaced with blockchain analysts to help facilitate the recovery process.Thanks to their efforts, I was able to successfully recover my stolen funds. The entire process took some time, but the Aspen Recovery Experts dedicated team provided regular updates and kept me informed throughout the process, which gave me a sense of hope and relief during an otherwise stressful time. If you’re ever in a similar situation, I highly recommend reaching out to a trusted recovery team like Aspen Recovery Expertshhh . Their professionalism, knowledge, and expertise were critical in helping me recover my funds and regain control of my crypto assets. Whatsapp : +1 747 231 9036 Telegram : @ prohackerspy Email : [email protected]

  • 03.08.26 20:06 Philip

    I was a victim of a crypto theft involving a Pink Drainer, which resulted in the theft of my Wrapped Bitcoin (WBTC) from my Polygon network. The experience was incredibly frustrating and distressing, as I had no idea how to recover my funds. Unfortunately, by the time I noticed the theft, the funds had already been drained to an address that I had no control over, making it seem like an irreversible situation.The attack happened when I clicked on what appeared to be a legitimate link. I didn’t realize at the time that it was a phishing attempt designed to siphon off my private keys and access my wallet. The Pink Drainer, a type of malicious script used by attackers, is specifically designed to exploit such vulnerabilities in crypto wallets. The moment I realized that my WBTC had been drained from my Polygon network. I felt completely helpless, as I didn’t have direct access to the thief's address, and there was no way to reverse the transaction on my own at that point, I started searching for ways to recover my funds, but most resources only offered generic advice that wasn’t practical in this particular case. I quickly realized that if I wanted to have any hope of getting my assets back, I would need professional assistance. After some research, I came across a reliable and trusted recovery team called Aspen Recovery Experts. Their expertise in cryptocurrency recovery, especially in cases like mine, seemed promising.I decided to reach out to Aspen Recovery Experts, and I’m incredibly grateful that I did. Their team of crypto recovery experts was able to help me trace the stolen funds and identify the path the funds took after they left my wallet. Using advanced tools and techniques, they were able to track the transactions on the blockchain, helping me understand where my WBTC had been sent. More importantly, they worked tirelessly to assist me in contacting the necessary parties and even interfaced with blockchain analysts to help facilitate the recovery process.Thanks to their efforts, I was able to successfully recover my stolen funds. The entire process took some time, but the Aspen Recovery Experts dedicated team provided regular updates and kept me informed throughout the process, which gave me a sense of hope and relief during an otherwise stressful time. If you’re ever in a similar situation, I highly recommend reaching out to a trusted recovery team like Aspen Recovery Expertshhh . Their professionalism, knowledge, and expertise were critical in helping me recover my funds and regain control of my crypto assets. Whatsapp : +1 747 231 9036 Telegram : @ prohackerspy Email : [email protected]

  • 04.08.26 11:05 Kisnoles

    Excellent analysis, thank you. I was particularly struck by how rigidly the skill sets the order: data processing and form come first, with color coming last. This really cures the habit of "first a pretty palette, then we'll figure it out." A palette validator using OKLCH + color blindness + WCAG is something most chart generators lack. And regarding the boundaries of competence, it's very clear. Where there's a self-checking loop (color), you delegate freely. Where there's a heuristic (form, data interpretation), you remain the final filter. This is a universal principle, not just for /dataviz. By the way, when you look at trading dashboards (including those of decent platforms like ExpertOption), it's immediately clear who thought about readability and who just threw in rainbow lines. Tools like this skill could greatly improve the quality of analytics. Thanks again for the detailed analysis – saved.

  • 04.08.26 12:37 kimberlyhebertt6877

    I invested in bitcoin trading After losing $78.4 USDT) linked to a romance fraud scam worth of cryptocurrency through an online investment platform and later discovered it was a scam. After extensive research for recovery options, I contacted CAPITAL CRYPTO RECOVER based on positive client reviews and recommendations. Their professional security team guided me through the recovery process using advanced technology, and I was able to recover my lost cryptocurrency successfully. I am truly grateful for their support and assistance during such a difficult experience. I will advise you to contact CAPITAL CRYPTO RECOVER helped me recover my funds. For anyone facing similar issues, Website: https://recovercapital.wixsite.com/capital-crypto-rec-1 Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text Number: +1 (336) 390-6684

  • 04.08.26 12:37 kimberlyhebertt6877

    I invested in bitcoin trading After losing $78.4 USDT) linked to a romance fraud scam worth of cryptocurrency through an online investment platform and later discovered it was a scam. After extensive research for recovery options, I contacted CAPITAL CRYPTO RECOVER based on positive client reviews and recommendations. Their professional security team guided me through the recovery process using advanced technology, and I was able to recover my lost cryptocurrency successfully. I am truly grateful for their support and assistance during such a difficult experience. I will advise you to contact CAPITAL CRYPTO RECOVER helped me recover my funds. For anyone facing similar issues, Website: https://recovercapital.wixsite.com/capital-crypto-rec-1 Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] Call/Text Number: +1 (336) 390-6684

  • 06.08.26 08:11 ROMMYHENDERSON344

    All you need is to hire an expert to help you accomplish that. If there's any need to spy on your partner's phone. From my experience I lacked evidence to confront my husband on my suspicion on his infidelity, until I came across REALCYBERHACKERS which many commend him of assisting them in their spying mission. So I contacted him and he provided me with access into his phone to view all text messages, call logs, WhatsApp messages and even her location. This evidence helped me move him off my life . I recommend you consult REALCYBERHACKERS AT gmail com or whatsapp +14106350697 if you need access to your partner's phone or any kind of hacking, they carry out all kinds of hacking job

  • 06.08.26 13:56 lydiassmith567

    HIRE A HACKER YOUR STOLEN CRYPTO RECOVERY / BTC / USDT / ETH WITH THE HELP OF CAPITAL CRYPTO RECOVER. I want to share my experience publicly regarding cryptocurrency wallet recovery, I highly recommend you to contact CAPITAL CRYPTO RECOVER, a professional private investigator in the Bitcoin world. They have a certified expert security team specializing in Bitcoin Recovery Services and have helped many people worldwide recover their lost funds. My wife and I were defrauded by an online manipulator posing as an experienced crypto investment professional. We lost $9.2 Million Stolen BTC in cryptocurrency and were left feeling homeless. After spending hours searching for a reliable crypto recovery service, I discovered CAPITAL CRYPTO RECOVER online. By patiently explaining my situation to their team, I was able to recover all my funds. Remarkably, my money was returned to my wallet in less than 24 hours. I am extremely grateful to CAPITAL CRYPTO RECOVER for their excellent assistance—they truly were a godsend in my difficult situation. If you have fallen victim to a cryptocurrency scam, you can reach CAPITAL CRYPTO RECOVER through the following channels Email: [email protected] OR Call/Text: +1 (336) 390-6684 Contact: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 06.08.26 13:56 lydiassmith567

    HIRE A HACKER YOUR STOLEN CRYPTO RECOVERY / BTC / USDT / ETH WITH THE HELP OF CAPITAL CRYPTO RECOVER. I want to share my experience publicly regarding cryptocurrency wallet recovery, I highly recommend you to contact CAPITAL CRYPTO RECOVER, a professional private investigator in the Bitcoin world. They have a certified expert security team specializing in Bitcoin Recovery Services and have helped many people worldwide recover their lost funds. My wife and I were defrauded by an online manipulator posing as an experienced crypto investment professional. We lost $9.2 Million Stolen BTC in cryptocurrency and were left feeling homeless. After spending hours searching for a reliable crypto recovery service, I discovered CAPITAL CRYPTO RECOVER online. By patiently explaining my situation to their team, I was able to recover all my funds. Remarkably, my money was returned to my wallet in less than 24 hours. I am extremely grateful to CAPITAL CRYPTO RECOVER for their excellent assistance—they truly were a godsend in my difficult situation. If you have fallen victim to a cryptocurrency scam, you can reach CAPITAL CRYPTO RECOVER through the following channels Email: [email protected] OR Call/Text: +1 (336) 390-6684 Contact: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 11.08.26 03:43 raymont0714

    I recommend a trusted cybersecurity PRO with experience in authorized device access, security testing, and data recovery. SHE work only with the owner's consent and follow all legal and privacy rules on meta data. With permission, this specialist can recover lost files, check device security offline & online, and review texts, call records, or hidden data (spy or lurk around a cheating partner or colleuge). Strict confidentiality agreements protect the information, and client details remain private. The work is careful, efficient, and suited to complex cases. For help securing or recovering information from a phone or another electronic device, use the details below 2 consult [email protected] +44 7476618364 I trust her secrecy a living witness. Her discretion is unmatched, ensuring your privacy is always maintained

  • 12.08.26 16:37 rssllhrnsb

    I learned an important lesson after investing in what appeared to be a genuine opportunity. Unfortunately, I was unable to access my funds, which reinforced the importance of carrying out thorough due diligence, checking whether an investment is appropriately regulated, and seeking qualified professional advice rather than relying solely on online reviews or testimonials. During the process of addressing my case, I worked with Mrs. Tatiana Sorina , who communicated clearly, provided regular updates, and handled the matter in a professional manner. According to my experience, I have recovered $50,000 so far, while efforts to resolve the remaining balance are still in progress. If you wish to contact her, the details I used are: Mrs. Tatiana Sorina
TEXT : (tatianasorina06 at G_Ma IL dot ..c 0 m)…. Before committing money to any investment, take time to verify the legitimacy of the platform, confirm any relevant regulatory authorisations, and avoid investing more than you can comfortably afford to lose.

  • 16.08.26 01:44 Matt Kegan

    CapitalNode Analytics. They help to investigate and recover stolen digital assets from fake trading platforms. Great firm i must say.

  • 18.08.26 04:59 marcushenderson624

    Bitcoin Recovery Testimonial After falling victim to a cryptocurrency scam group, I lost $354,000 worth of USDT. I thought all hope was lost from the experience of losing my hard-earned money to scammers. I was devastated and believed there was no way to recover my funds. Fortunately, I started searching for help to recover my stolen funds and I came across a lot of testimonials online about Capital Crypto Recovery, an agent who helps in recovery of lost bitcoin funds, I contacted Capital Crypto Recover Service, and with their expertise, they successfully traced and recovered my stolen assets. Their team was professional, kept me updated throughout the process, and demonstrated a deep understanding of blockchain transactions and recovery protocols. They are trusted and very reliable with a 100% successful rate record Recovery bitcoin, I’m grateful for their help and highly recommend their services to anyone seeking assistance with lost crypto. Contact: [email protected] Phone WhatsApp/Text Number: +1 (336) 390-6684 Email: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 18.08.26 04:59 marcushenderson624

    Bitcoin Recovery Testimonial After falling victim to a cryptocurrency scam group, I lost $354,000 worth of USDT. I thought all hope was lost from the experience of losing my hard-earned money to scammers. I was devastated and believed there was no way to recover my funds. Fortunately, I started searching for help to recover my stolen funds and I came across a lot of testimonials online about Capital Crypto Recovery, an agent who helps in recovery of lost bitcoin funds, I contacted Capital Crypto Recover Service, and with their expertise, they successfully traced and recovered my stolen assets. Their team was professional, kept me updated throughout the process, and demonstrated a deep understanding of blockchain transactions and recovery protocols. They are trusted and very reliable with a 100% successful rate record Recovery bitcoin, I’m grateful for their help and highly recommend their services to anyone seeking assistance with lost crypto. Contact: [email protected] Phone WhatsApp/Text Number: +1 (336) 390-6684 Email: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 19.08.26 14:50 BAYER7043

    My account was locked, and I couldn’t access my own information until [email protected] +447476618364 whats?up? helped me recover it. This lady hacker was kind and professional, but this experience showed me how risky account lockouts can be. If you’re facing the same problem, do not panic consult her A. S. A. P. Be careful with recovery agents outchea, and research their name, business, and reviews before sharing any details. Never send passwords, security codes, banking information, or copies of your ID unless you’ve confirmed who you’re dealing with. Be wary of promises that sound too good to be true, especially claims that require little information or guarantee instant access with outrageous fees.

  • 20.08.26 11:32 michaeldavenport218

    I was recently scammed out of $53,000 by a fraudulent Bitcoin investment scheme, which added significant stress to my already difficult health issues, as I was also facing cancer surgery expenses. Desperate to recover my funds, I spent hours researching and consulting other victims, which led me to discover the excellent reputation of Capital Crypto Recover, I came across a Google post It was only after spending many hours researching and asking other victims for advice that I discovered Capital Crypto Recovery’s stellar reputation. I decided to contact them because of their successful recovery record and encouraging client testimonials. I had no idea that this would be the pivotal moment in my fight against cryptocurrency theft. Thanks to their expert team, I was able to recover my lost cryptocurrency back. The process was intricate, but Capital Crypto Recovery's commitment to utilizing the latest technology ensured a successful outcome. I highly recommend their services to anyone who has fallen victim to cryptocurrency fraud. For assistance contact [email protected] and on Telegram OR WhatsApp Number +1 (336)390-6684 via email: [email protected] you can visit his website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 20.08.26 11:32 michaeldavenport218

    I was recently scammed out of $53,000 by a fraudulent Bitcoin investment scheme, which added significant stress to my already difficult health issues, as I was also facing cancer surgery expenses. Desperate to recover my funds, I spent hours researching and consulting other victims, which led me to discover the excellent reputation of Capital Crypto Recover, I came across a Google post It was only after spending many hours researching and asking other victims for advice that I discovered Capital Crypto Recovery’s stellar reputation. I decided to contact them because of their successful recovery record and encouraging client testimonials. I had no idea that this would be the pivotal moment in my fight against cryptocurrency theft. Thanks to their expert team, I was able to recover my lost cryptocurrency back. The process was intricate, but Capital Crypto Recovery's commitment to utilizing the latest technology ensured a successful outcome. I highly recommend their services to anyone who has fallen victim to cryptocurrency fraud. For assistance contact [email protected] and on Telegram OR WhatsApp Number +1 (336)390-6684 via email: [email protected] you can visit his website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 23.08.26 20:02 leslieyee

    Excellent analysis by /dataviz! I was particularly struck by how strictly the order is defined: "data meaning first, color last" and how the validator actually adjusts the palette according to OKLCH, color blindness, and WCAG standards. These rules greatly improve the quality of charts. By the way, a similar approach to clean and legible charts is highly valued in trading—for example, on the ExpertOption platform, the interface and price visualization are designed to ensure information is read instantly and without unnecessary noise.

  • 25.08.26 13:44 lydiassmith567

    HIRE A HACKER YOUR STOLEN CRYPTO RECOVERY / BTC / USDT / ETH WITH THE HELP OF CAPITAL CRYPTO RECOVER. I want to share my experience publicly regarding cryptocurrency wallet recovery, I highly recommend you to contact CAPITAL CRYPTO RECOVER, a professional private investigator in the Bitcoin world. They have a certified expert security team specializing in Bitcoin Recovery Services and have helped many people worldwide recover their lost funds. My wife and I were defrauded by an online manipulator posing as an experienced crypto investment professional. We lost $9.2 Million Stolen BTC in cryptocurrency and were left feeling homeless. After spending hours searching for a reliable crypto recovery service, I discovered CAPITAL CRYPTO RECOVER online. By patiently explaining my situation to their team, I was able to recover all my funds. Remarkably, my money was returned to my wallet in less than 24 hours. I am extremely grateful to CAPITAL CRYPTO RECOVER for their excellent assistance—they truly were a godsend in my difficult situation. If you have fallen victim to a cryptocurrency scam, you can reach CAPITAL CRYPTO RECOVER through the following channels Email: [email protected] OR Call/WhatsApp: +1 (336) 390-6684 Contact: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 25.08.26 13:44 lydiassmith567

    HIRE A HACKER YOUR STOLEN CRYPTO RECOVERY / BTC / USDT / ETH WITH THE HELP OF CAPITAL CRYPTO RECOVER. I want to share my experience publicly regarding cryptocurrency wallet recovery, I highly recommend you to contact CAPITAL CRYPTO RECOVER, a professional private investigator in the Bitcoin world. They have a certified expert security team specializing in Bitcoin Recovery Services and have helped many people worldwide recover their lost funds. My wife and I were defrauded by an online manipulator posing as an experienced crypto investment professional. We lost $9.2 Million Stolen BTC in cryptocurrency and were left feeling homeless. After spending hours searching for a reliable crypto recovery service, I discovered CAPITAL CRYPTO RECOVER online. By patiently explaining my situation to their team, I was able to recover all my funds. Remarkably, my money was returned to my wallet in less than 24 hours. I am extremely grateful to CAPITAL CRYPTO RECOVER for their excellent assistance—they truly were a godsend in my difficult situation. If you have fallen victim to a cryptocurrency scam, you can reach CAPITAL CRYPTO RECOVER through the following channels Email: [email protected] OR Call/WhatsApp: +1 (336) 390-6684 Contact: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 30.08.26 15:37 [email protected]

    Discovering I had been defrauded, I searched online for services claiming to recover stolen ETH. I contacted several companies, but none succeeded. Although some claimed they could trace assets or recover funds, I could not verify their success or recover my money. I later found SYLVESTER BRYANT Recovery through Google. After contacting him, he recovered 450,000,00. He can be reached at [email protected] or WhatsApp at +1 512 577 7957.

  • 30.08.26 15:37 [email protected]

    Discovering I had been defrauded, I searched online for services claiming to recover stolen ETH. I contacted several companies, but none succeeded. Although some claimed they could trace assets or recover funds, I could not verify their success or recover my money. I later found SYLVESTER BRYANT Recovery through Google. After contacting him, he recovered 450,000,00. He can be reached at [email protected] or WhatsApp at +1 512 577 7957.

  • 01.09.26 11:16 lisawerth897

    My Experience With Cryptocurrency — CAPITAL CRYPTO RECOVER I lost over $82,000 in Bitcoin after falling victim to a fraudulent online investment scheme. After realizing I had been scammed, I spent considerable time researching possible ways to recover my funds. During my research, I came across CAPITAL CRYPTO RECOVER and decided to contact them after reading their reported success record and encouraging client positive reviews and testimonials. Their team guided me through the recovery process, and I was grateful to successfully recover my lost cryptocurrency. The experience was challenging, but I appreciated the assistance and support I received throughout the process. I’m sharing my experience in the hope that it may encourage other victims to carefully research their options and verify any recovery service before proceeding. I will forever be thankful to you CAPITAL CRYPTO RECOVER 📧 [email protected] 🌐 Website: recovercapital.wixsite.com/capital-crypto-rec-1 📧 [email protected] 📞 Call/WhatsApp: +1 (336) 390-6684

  • 01.09.26 11:16 lisawerth897

    My Experience With Cryptocurrency — CAPITAL CRYPTO RECOVER I lost over $82,000 in Bitcoin after falling victim to a fraudulent online investment scheme. After realizing I had been scammed, I spent considerable time researching possible ways to recover my funds. During my research, I came across CAPITAL CRYPTO RECOVER and decided to contact them after reading their reported success record and encouraging client positive reviews and testimonials. Their team guided me through the recovery process, and I was grateful to successfully recover my lost cryptocurrency. The experience was challenging, but I appreciated the assistance and support I received throughout the process. I’m sharing my experience in the hope that it may encourage other victims to carefully research their options and verify any recovery service before proceeding. I will forever be thankful to you CAPITAL CRYPTO RECOVER 📧 [email protected] 🌐 Website: recovercapital.wixsite.com/capital-crypto-rec-1 📧 [email protected] 📞 Call/WhatsApp: +1 (336) 390-6684

  • 01.09.26 17:34 Garry42

    Really crazy world. These fraudsters go at any length to steal your hard earned funds. I have been a victim of a bitcoin scam about 7 months back. A Con artist gained access to my cashapp account through a phishing scam. They stole $409,000. I was really devastated. I did everything to get back my funds by contacting the FBI but they claimed there was nothing they could do. A friend told me about a recovery expert. He helps fight against various phishing and investment scams and they were able to help trace and recover my funds even though it took over 2 days. you can reach out to him through recoverydarek@gmail. com . I can guarantee his services are still active.

  • 01.09.26 17:34 Garry42

    Really crazy world. These fraudsters go at any length to steal your hard earned funds. I have been a victim of a bitcoin scam about 7 months back. A Con artist gained access to my cashapp account through a phishing scam. They stole $409,000. I was really devastated. I did everything to get back my funds by contacting the FBI but they claimed there was nothing they could do. A friend told me about a recovery expert. He helps fight against various phishing and investment scams and they were able to help trace and recover my funds even though it took over 2 days. you can reach out to him through recoverydarek@gmail. com . I can guarantee his services are still active.

  • 02.09.26 03:43 kimberlyhebertt6877

    I invested in bitcoin trading After losing $78.4 USDT) linked to a romance fraud scam worth of cryptocurrency through an online investment platform and later discovered it was a scam. After extensive research for recovery options, I contacted CAPITAL CRYPTO RECOVER based on positive client reviews and recommendations. Their professional security team guided me through the recovery process using advanced technology, and I was able to recover my lost cryptocurrency successfully. I am truly grateful for their support and assistance during such a difficult experience. I will advise you to contact CAPITAL CRYPTO RECOVER helped me recover my funds. For anyone facing similar issues, Website: https://recovercapital.wixsite.com/capital-crypto-rec-1 Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] WhatsApp/Text Number: +1 (336) 390-6684

  • 02.09.26 03:43 kimberlyhebertt6877

    I invested in bitcoin trading After losing $78.4 USDT) linked to a romance fraud scam worth of cryptocurrency through an online investment platform and later discovered it was a scam. After extensive research for recovery options, I contacted CAPITAL CRYPTO RECOVER based on positive client reviews and recommendations. Their professional security team guided me through the recovery process using advanced technology, and I was able to recover my lost cryptocurrency successfully. I am truly grateful for their support and assistance during such a difficult experience. I will advise you to contact CAPITAL CRYPTO RECOVER helped me recover my funds. For anyone facing similar issues, Website: https://recovercapital.wixsite.com/capital-crypto-rec-1 Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] WhatsApp/Text Number: +1 (336) 390-6684

  • 04.09.26 21:51 Kovengray

    Recovering your lost investment funds as the case might be, is not what you can do alone, you’d require the service of a trained recovery specialist. A recovery specialist is a person or a group of people who are well equipped to work around the brokerage network. They have vast knowledge about the whole network and have the right software and private keys to follow any transaction. I was ripped off trading online to an investment broker, good thing I got every penny back through the help of Gavin ray he’s a genius Contact : Gavinray78 at gmail com or WhatsApp +1 352 322 2096 It is also important to be patient and really calm during the process.

  • 05.09.26 21:38 [email protected]

    I invested 45,000  Euro, and later aggreviated to 198,000 Euro.  I requested  to place ‎Withdrawal of my funds to be paid to my Bank account. But nothing happened I was subjected to pay more fee until I can get my funds on my account, i got in touch with Theodore ryan here on this platform who had helped a lot of people, I followed all instructions and he legally got back my withheld funds, I got threatened by the company that if I don’t pay they will get my account frozen, all thanks to Theodore ryan and I highly recommend him to anyone dealing with an unregulated broker company… contact him on his Gmail - theodoreryan318@  gmail .  com

  • 09.09.26 21:31 lisawerth897

    My Experience With Cryptocurrency — CAPITAL CRYPTO RECOVER I lost over $82,000 in Bitcoin after falling victim to a fraudulent online investment scheme. After realizing I had been scammed, I spent considerable time researching possible ways to recover my funds. During my research, I came across CAPITAL CRYPTO RECOVER and decided to contact them after reading their reported success record and encouraging client positive reviews and testimonials. Their team guided me through the recovery process, and I was grateful to successfully recover my lost cryptocurrency. The experience was challenging, but I appreciated the assistance and support I received throughout the process. I’m sharing my experience in the hope that it may encourage other victims to carefully research their options and verify any recovery service before proceeding. I will forever be thankful to you CAPITAL CRYPTO RECOVER 📧 [email protected] 🌐 Website: recovercapital.wixsite.com/capital-crypto-rec-1 📧 [email protected] 📞 Call/WhatsApp: +1 (336) 390-6684

  • 09.09.26 21:31 lisawerth897

    My Experience With Cryptocurrency — CAPITAL CRYPTO RECOVER I lost over $82,000 in Bitcoin after falling victim to a fraudulent online investment scheme. After realizing I had been scammed, I spent considerable time researching possible ways to recover my funds. During my research, I came across CAPITAL CRYPTO RECOVER and decided to contact them after reading their reported success record and encouraging client positive reviews and testimonials. Their team guided me through the recovery process, and I was grateful to successfully recover my lost cryptocurrency. The experience was challenging, but I appreciated the assistance and support I received throughout the process. I’m sharing my experience in the hope that it may encourage other victims to carefully research their options and verify any recovery service before proceeding. I will forever be thankful to you CAPITAL CRYPTO RECOVER 📧 [email protected] 🌐 Website: recovercapital.wixsite.com/capital-crypto-rec-1 📧 [email protected] 📞 Call/WhatsApp: +1 (336) 390-6684

  • 09.09.26 23:22 Fraddy Pual

    Hearing that these individuals are focusing on other people makes me very sad. I had a similar situation with them and lost a lot of money, but after learning about (Cruxcipherteam @ proton DoT me), whataqq:+168160-15021, telegram: @Cruxcipherteam I was able to get my money back. It's critical that we all be watchful and keep reporting these occurrences.

  • 11.09.26 03:23 kimberlyhebertt6877

    I invested in bitcoin trading After losing $78.4 USDT) linked to a romance fraud scam worth of cryptocurrency through an online investment platform and later discovered it was a scam. After extensive research for recovery options, I contacted CAPITAL CRYPTO RECOVER based on positive client reviews and recommendations. Their professional security team guided me through the recovery process using advanced technology, and I was able to recover my lost cryptocurrency successfully. I am truly grateful for their support and assistance during such a difficult experience. I will advise you to contact CAPITAL CRYPTO RECOVER helped me recover my funds. For anyone facing similar issues, Website: https://recovercapital.wixsite.com/capital-crypto-rec-1 Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] WhatsApp/Text Number: +1 (336) 390-6684

  • 11.09.26 03:23 kimberlyhebertt6877

    I invested in bitcoin trading After losing $78.4 USDT) linked to a romance fraud scam worth of cryptocurrency through an online investment platform and later discovered it was a scam. After extensive research for recovery options, I contacted CAPITAL CRYPTO RECOVER based on positive client reviews and recommendations. Their professional security team guided me through the recovery process using advanced technology, and I was able to recover my lost cryptocurrency successfully. I am truly grateful for their support and assistance during such a difficult experience. I will advise you to contact CAPITAL CRYPTO RECOVER helped me recover my funds. For anyone facing similar issues, Website: https://recovercapital.wixsite.com/capital-crypto-rec-1 Email: [email protected] Telegram: @Capitalcryptorecover Contact: [email protected] WhatsApp/Text Number: +1 (336) 390-6684

  • 15.09.26 03:35 elioduncan

    I fell victim to a freelance web development contract scam that ultimately cost me CAD 4,000. It all started when I came across a job posting on Indeed Canada, a popular online job portal. The position seemed perfect: a freelance web developer role for an established company looking for someone to design and build a fully functional e-commerce website. The job promised a high payment of CAD 20,000 upon successful completion, which sounded like a great opportunity for me to gain experience and earn decent pay.The employer, who introduced himself as a project manager from a "well-known" tech company, was very persuasive and professional in our initial communication. He explained that the project involved developing a user-friendly, responsive online store for their client and that they had a strict timeline to meet. He assured me that the payment would be made promptly after completing the tasks. However, before starting the work, he told me that I would need to pay an upfront fee of CAD 4,000 to cover certain software tools and licensing fees required for the project. This was supposedly a part of their company policy for freelance contractors, ensuring access to their premium resources. The idea of working on a professional project, coupled with the promise of a substantial payout, convinced me to pay the upfront fee.As soon as I made the payment, the project manager became increasingly difficult to reach. He initially responded to my emails and provided some vague instructions on what the project would entail, but as time went on, communication slowed to a complete halt. I never received the required tools or any proper project details. My emails went unanswered, and any attempts to contact the company were met with silence. After waiting for weeks, I realized that I had been scammed.Desperate to recover my money, I turned to TechY Force Cyber Retrieval, a service that specializes in helping victims of online scams. They helped me track the payment and took legal steps to pursue the fraudsters. Through their guidance, I was able to recover the full CAD 4,000. TechY Force Cyber Retrieval worked with my bank to reverse the transaction and liaised with the authorities to trace the scammer's details.This was a hard lesson, and I now know to be highly cautious about online job offers that require upfront payments. It is crucial to research companies thoroughly and avoid any job that seems too good to be true, especially when it involves paying money upfront. WhatsApp https://wa.link/2x6ktp Mail. [email protected]

  • 15.09.26 15:45 lydiassmith567

    HIRE A HACKER YOUR STOLEN CRYPTO RECOVERY / BTC / USDT / ETH WITH THE HELP OF CAPITAL CRYPTO RECOVER. I want to share my experience publicly regarding cryptocurrency wallet recovery, I highly recommend you to contact CAPITAL CRYPTO RECOVER, a professional private investigator in the Bitcoin world. They have a certified expert security team specializing in Bitcoin Recovery Services and have helped many people worldwide recover their lost funds. My wife and I were defrauded by an online manipulator posing as an experienced crypto investment professional. We lost $9.2 Million Stolen BTC in cryptocurrency and were left feeling homeless. After spending hours searching for a reliable crypto recovery service, I discovered CAPITAL CRYPTO RECOVER online. By patiently explaining my situation to their team, I was able to recover all my funds. Remarkably, my money was returned to my wallet in less than 24 hours. I am extremely grateful to CAPITAL CRYPTO RECOVER for their excellent assistance—they truly were a godsend in my difficult situation. If you have fallen victim to a cryptocurrency scam, you can reach CAPITAL CRYPTO RECOVER through the following channels Email: [email protected] OR Call/WhatsApp: +1 (336) 390-6684 Contact: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 15.09.26 15:45 lydiassmith567

    HIRE A HACKER YOUR STOLEN CRYPTO RECOVERY / BTC / USDT / ETH WITH THE HELP OF CAPITAL CRYPTO RECOVER. I want to share my experience publicly regarding cryptocurrency wallet recovery, I highly recommend you to contact CAPITAL CRYPTO RECOVER, a professional private investigator in the Bitcoin world. They have a certified expert security team specializing in Bitcoin Recovery Services and have helped many people worldwide recover their lost funds. My wife and I were defrauded by an online manipulator posing as an experienced crypto investment professional. We lost $9.2 Million Stolen BTC in cryptocurrency and were left feeling homeless. After spending hours searching for a reliable crypto recovery service, I discovered CAPITAL CRYPTO RECOVER online. By patiently explaining my situation to their team, I was able to recover all my funds. Remarkably, my money was returned to my wallet in less than 24 hours. I am extremely grateful to CAPITAL CRYPTO RECOVER for their excellent assistance—they truly were a godsend in my difficult situation. If you have fallen victim to a cryptocurrency scam, you can reach CAPITAL CRYPTO RECOVER through the following channels Email: [email protected] OR Call/WhatsApp: +1 (336) 390-6684 Contact: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

Для участия в Чате вам необходим бесплатный аккаунт pro-blockchain.com Войти Регистрация
Есть вопросы?
С вами на связи 24/7
Help Icon