Интересное что-то
517 subscribers
2.72K photos
253 videos
139 files
4.52K links
Материалы и мысли, понадерганные отовсюду
Блог: https://t.me/asisakov_channel
Чат: https://t.me/youknowds_chat
Download Telegram
Forwarded from Душный NLP
Механизм аттеншена NSA

Native Sparse Attention (NSA) — механизм разреженного аттеншена от инженеров из DeepSeek. Утверждается, что NSA имеет качество, сопоставимое с обычным аттеншном на маленьких контекстах, и значительно опережает его на больших — в статье сравнение производится на 64K токенов.

Вместо того чтобы каждый новый query обращался ко всем предыдущим key и value, как это делается в традиционном аттеншне, авторы предлагают сжимать предыдущие ключи и значения в dense-представления. За счёт этого длина последовательности, над которой работает attention, уменьшается, что позволяет работать с контекстом в 64K токенов так, будто их всего 4K. В отличие от предыдущих sparse-методов аттеншна (например, Quest), NSA применяется как при обучении, так и при инференсе.

В статье предлагают три функции для сжатия представления: token compression, token selection и sliding window. Для каждой из них считается аттеншен, а результаты складываются с коэффициентами от MLP-блока.

Token compression предполагает покрытие последовательностей ключей и значений блоками длины 32 с перекрытием по 16 токенов с последующим сжатием каждого блока в «один токен» с помощью MLP с внутриблочным позиционным энкодингом.

На стадии token selection тоже происходит покрытие ключей и значений блоками, но теперь для каждого из них считается скор полезности. После чего выбираются top-16 блоков с максимальным скором. На оставшиеся блоки аттеншн не смотрит, а в выбранных внимание обращается на все ключи и значения.

Авторы отмечают, что в начале обучения сильно доминировали локальные паттерны. Поэтому selection и compression больше фокусировались на последовательностях ближе к текущему токену. В конце, на длинных контекстах, возникали сложности с аттеншеном на начало последовательности. Чтобы решить эту проблему, предлагается дополнительно использовать sliding window для аттеншена на ближайшие 512 токенов.

Метод проверяли на MoE-модели на 27B параметров, из которых 3B — активные. У модели было 30 слоёв аттеншена и 64 головы с разной размерностью. Число экспертов — 72, из них общих — 2. Обучение происходило на 270B токенов с размером контекстного окна в 8K токенов. Далее был SFT с использованием техники YaRN.

Результаты тестов показали, что на бенчмарках, где длинный контекст не так важен — например, MMLU или HumanEval — деградации качества от использования NSA не происходит. На LongBench же NSA показывает качество в среднем на 10% лучше, чем Full Attention. Например, на LCC, где требуется дополнить сниппет кода на основе очень длинного контекста, NSA побеждает 0,232 на 0,163.

Кроме того, есть ощутимый прирост в скорости — вплоть до 9 раз на форварде и 6 раз на бекварде при сравнении с FlashAttention 2. Это стало возможно за счёт эффективного Triton-кернела, кодом которого разработчики не делятся, но в open source уже началась работа по его воспроизведению.

Разбор подготовил Владислав Савинов

Душный NLP
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Yandex Product Party - 20.03.2024 - OutOfScope.pdf
25.8 MB
❣️ ЯНДЕКС УЧИТ ЗАПУСКАТЬ СТАРТАПЫ 🦄

Под большим впечатлением от крайней трансляции Yandex Product Party. Каждая из четырех лекций пропитана стартаперским духом, подходами как проанализировать рынок и приступить к быстрому тестированию. Так что must see и коротко расскажу почему стоит посмотреть каждый из докладов 📌

1️⃣ Высококонкурентный рынок и новый продукт: быть или не быть
👥 Евгений Загуменнов, Head of Yandex Crowd Solutions
Конкурентный анализ красного рынка, ответ на вопрос почему сейчас и самое интересное про состав команды на различных этапах развития стартапа

2️⃣ Дальше, чем обычно: особенности продукта для междугородних поездок на такси
🚕 Владислав Телепов, Старший менеджер продукта Яндекс Go
Анализ рынка по критериям Удобство/Гибкость/Цена/Надежность, про работу с мотивацией клиентов и ценообразование такси

3️⃣ Как перейти от B2C к B2B и покорить новый сегмент рынка: кейс Яндекс Аренды
🏡 Мария Дорофеева, CPO Яндекс Аренды
Глубокий клиентский анализ, формирование ключевого функционала приложения и описание критериев успеха

4️⃣ Стартап с ограничением 20 км в час: самокаты в Яндекс Go
🔨 Леонид Ясиновский, Руководитель сервиса «Самокаты» Яндекс Go
Детальный анализ международных и локальных конкурентов, анализ причин провала и самое крутое — как сделать быстро MVP, переиспользуя решения Яндекса — Драйв 🚙 и Еда 🍔

Если тебе заходит такой контент, ты можешь забустить канал — http://t.me/out_of_scope?boost
#YandexProductParty #Яндекс
OutOfScope | OOS
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Ai molodca (Dobrokotov)
Вышла новая нейросеть Reve, а это ее художественный тест.

Если коротко: это гибрид FLUX и Идеограма, прекрасно слушает длинные промты, так же прекрасно может в текст (однако немного шакалит лица и детали на крупных планах). Но что самое классное и интересное: отлично знает советское и пост-советское. Панельки, автопром, ковры на стенах. Вот это вот все. Если раньше для этого нужны были отдельные лоры, то теперь можно пользоваться Reve.

Бесплатно, в день дается n-ое количество генераций на один аккаунт (который можно удалить и зарегистрироваться заново). Приглашаю всех в тесту в комментарии. Помните, что можно кидать картинку в окно промта.
#prompt

25 Grok’s image Editing Prompts, Grok Released Image edit feature —check out what I tried!



General Adjustments

1. Brighten the Image
* Hey, this pic’s way too dim—can you lighten it up? Make it feel all sunny and happy, like a perfect day.
2. Make Colors More Vibrant
* The colors are decent, but I want them to really jump out at me—can you boost them so they’re super bold and lively?
3. Adjust Contrast
* Everything’s kinda mushy here—can you tweak the contrast? I want the details to pop so I can actually see what’s happening.
4. Change the Background
* The background’s blah and boring—how about switching it to something cool, like a deep purple fade? That’d look so much better.
5. Crop the Image
* There’s all this extra junk around the edges—can you chop it down to just the guy in the center? He’s the star of the show anyway.

Adding or Removing Elements

1. Add a Red Sports Car
* This needs some pizzazz—how about sticking a slick red sports car over on the side? That’d totally kick it up a notch!

2. Insert Birds in the Sky
* The sky’s just sitting there—can you throw in some birds soaring around? It’d make it feel more alive and free.
3. Remove a Tree
* That tree on the right is bugging me—it’s blocking everything. Can you zap it out of there?
4. Add Text
* I want this to say something—can you add big, chunky white letters at the top that say ‘Good Vibes Only’? That’d set the mood.
5. Add a Dog
* This pic’s missing some cuteness—how about popping in a scruffy little beagle right up front? I’d melt every time I see it!

Style and Mood Changes

1. Vintage Black-and-White
* I’m feeling all retro today—can you make this look like an old black-and-white snapshot? Like something my grandma would’ve framed.
2. Watercolor Painting Style
* This is too crisp for me—can you blur it into a soft, flowy watercolor? I’m craving that dreamy, artsy feel.
3. Rainy Day Mood
* I’m in a chill mood—can you turn this into a rainy day with dark clouds and wet streets? Perfect for curling up with tea.
4. Cyberpunk Style
* I’m hooked on sci-fi vibes—can you make this a glowing cyberpunk city with neon signs everywhere? Make it crazy cool
5. Cartoon Version
* This is too serious—can you turn it into a goofy cartoon with thick lines and wild colors? Let’s have some fun with it!

Specific Object Modifications

1. Change Shirt Color
* That dude’s shirt is so dull—can you swap it for a bright red one? It’d totally wake up the whole pic.
2. Modify the Cat
* I’m not vibing with this gray cat—can you make it a fluffy white one instead? Way cuter in my book.
3. Turn Car into Motorcycle
* The car’s okay, but I’d love a motorcycle more—can you change it to a shiny silver bike? That’d be epic.
4. Change Hair Style
* Her straight black hair’s fine, but I’d rather see it curly and red—can you switch it up? It’d look so much sassier.
5. Replace Coffee Mug
* Coffee’s not my jam—can you ditch the mug and put in a tall glass of iced lemonade? That’s more my speed!

Combining Instructions

1. Brighten and Add Sunset
* This feels dark and meh—can you brighten it and slap a gorgeous pink sunset in the back? I want warm, cozy vibes.
2. Remove People and Change to Night
* Too many folks cluttering this up—can you clear them out and make it a quiet night with twinkly stars? Super peaceful.
3. Make It a Snowy Scene
* I’m dreaming of winter—can you add snow falling and turn the house into a little wooden cabin? It’d feel so toasty.
4. Sharpen, Add Rainbow, Change Grass
* This is fuzzy and flat—can you sharpen it, toss in a rainbow on the right, and swap the grass for a golden desert? Let’s mix it up!
5. Sci-Fi Transformation
* I’m in a spacey mood—can you transform this into a sci-fi world with a floating drone and glowing blue plants? Go nuts with it!

I’ve been messing around with Grok’s natural language prompts to tweak and transform images, and honestly, it’s been way too much fun.
Thought I’d share a few of the prompts I threw at it—some of these results had me cracking up or just straight-up impressed. Here’s a taste:

* Hey, this pic’s way too dim—can you lighten it up? Make it feel all sunny and happy, like a perfect day." (Grok nailed it—suddenly, it’s like the sun came out and everything’s glowing.)
* The colors are decent, but I want them to really jump out at me—can you boost them so they’re super bold and lively?" (Boom, instant eye candy. The colors went from “meh” to “whoa!”)
* This needs some pizzazz—how about sticking a slick red sports car over on the side? That’d totally kick it up a notch!" (And just like that, there’s a shiny red car chilling in the scene. Grok gets me.)
* I’m feeling all retro today—can you make this look like an old black-and-white snapshot? Like something my grandma would’ve framed." (Nailed the vintage vibe—feels like I found it in an attic.)
* This is too serious—can you turn it into a goofy cartoon with thick lines and wild colors? Let’s have some fun with it!" (It’s like Grok turned the image into a Saturday morning cartoon. Pure chaos, and I love it.)

Seriously, if you haven’t tried this yet, you’re missing out. It’s like having a magic wand for your pics—just describe what you want, and boom, it happens. Now I’m curious—what’s the coolest (or weirdest) edit you’ve done with AI? Got any pro tips for getting the best results with Grok? Drop your thoughts in the comments—I’m here for all the AI shenanigans. And if you found this helpful, smash that upvote button so more people can join the fun!Happy editing, Redditors!