LINUX.ORG.RU

Избранные сообщения IPR

Нейросети на C от создателя Redis

 ,

Salvatore Sanfilippo тоже увлёкся нейросетями.

https://github.com/antirez/iris.c:

Iris is an inference pipeline that generates images from text prompts using open weights diffusion transformer models. It is implemented entirely in C, with zero external dependencies beyond the C standard library. MPS and BLAS acceleration are optional but recommended. Under macOS, a BLAS API is part of the system, so nothing is required.

The name comes from the Greek goddess Iris, messenger of the gods and personification of the rainbow.

Supported model families:

  • FLUX.2 Klein (by Black Forest Labs):
    • 4B distilled (4 steps, auto guidance set to 1, very fast).
    • 4B base (50 steps for max quality, or less. Classifier-Free Diffusion Guidance, much slower but more generation variety).
    • 9B distilled (4 steps, larger model, higher quality. Non-commercial license).
    • 9B base (50 steps, CFG, highest quality. Non-commercial license).
  • Z-Image-Turbo (by Tongyi-MAI):
    • 6B (8 NFE / 9 scheduler steps, no CFG, fast).

https://github.com/antirez/qwen-asr:

This is a C implementation of the inference pipeline for Qwen3-ASR speech-to-text models (both 0.6B and 1.7B). It has zero external dependencies beyond the C standard library and a BLAS implementation (Accelerate on macOS, OpenBLAS on Linux). Tokens stream to stdout as they are generated. The implementation runs at speed multiple of the file length even in very modest hardware, like low end Intel or AMD processor.

Important: this implementation explicitly avoids implementing support for MPS. Transcription systems are very important pieces of infrastructure, and are often run on remote Linux servers. Adding the MPS target would focus the efforts too much on Apple hardware, so for now I’m skipping it. The code runs very well anyway on Apple hardware (NEON optimized). Please, don’t send pull requests about this feature, fork the code instead, in order to add MPS support. I’ll add it much later when the other optimizations are already mature.

Supported modes and models

Both normal (offline) and streaming (online) modes are supported. Normal mode defaults to full offline decode (-S 0), so the whole audio is encoded at once. Streaming mode processes audio in 2-second chunks with prefix rollback (it keeps the last few decoded tokens as context for the decoder/LLM when transcribing the next chunk).

Important practical note: in this implementation, interactive --stream prioritizes incremental token stability over throughput and can be much slower than normal mode when you process an already-recorded file end-to-end.

Audio can be piped from stdin (--stdin), making it easy to transcode and transcribe any format via ffmpeg. Language is usually auto-detected from audio, and can be forced with --language. A system prompt can bias the model toward specific terms or spellings.

Both the 0.6B and 1.7B parameters models are supported. While the 1.7B model is generally more powerful, the 0.6B model seems the sweet spot for CPU inference, however the speed difference is not huge, so you may want to try both and decide what to use depending on your use case.


https://github.com/antirez/voxtral.c:

This is a C implementation of the inference pipeline for the Mistral AI’s Voxtral Realtime 4B model. It has zero external dependencies beyond the C standard library. The MPS inference is decently fast, while the BLAS acceleration is usable but slow (it continuously convert the bf16 weights to fp32).

Audio processing uses a chunked encoder with overlapping windows, bounding memory usage regardless of input length. Audio can also be piped from stdin (--stdin), or captured live from the microphone (--from-mic, macOS), making it easy to transcode and transcribe any format via ffmpeg. A streaming C API (vox_stream_t) lets you feed audio incrementally and receive token strings as they become available.

More testing needed: please note that this project was mostly tested against few samples, and likely requires some more work to be production quality. However the hard part, to understand the model inference and reproduce the inference pipeline, is here, so the rest likely can be done easily. Testing it against very long transcriptions, able to stress the KV cache circular buffer, will be a useful task.

Motivations (and some rant)

Thank you to Mistral for releasing such a great model in an Open Weights fashion. However, the author of this project believes that limiting the inference to a partnership with vLLM, without providing a self-contained reference implementation in Python, limits the model’s actual reach and the potential good effects it could have. For this reason, this project was created: it provides both a pure C inference engine and a simple, self-contained Python reference implementation (python_simple_implementation.py) that anyone can read and understand without digging through the vLLM codebase.


https://github.com/antirez/gguf-tools:

This is a work in progress library to manipulate GGUF files. While the library aims to be useful, one of the main goals is to provide an accessible code base that as a side effect documents the GGUF files used by the awesome llama.cpp project: GGUF files are becoming increasingly more used and central in the local machine learning scene, so to have multiple implementations of parsers and files generators may be useful.

The program gguf-tools uses the library to implement both useful and useless stuff, to show the library usage in the real world. For now the utility implements the following subcommands:

gguf-tools show file.gguf

shows detailed info about the GGUF file. This will include all the key-value pairs, including arrays, and detailed tensors informations. Tensor offsets will be relative to the start of the file (so they are actually absolute offsets), not the start of the data section like in the GGUF format.

gguf-tools compare file1.gguf file2.gguf

This tool is useful to understand if two LLMs (or other models distributed as GGUF files) are related, for instance if one is the finetune of another, or if both are fine-tuned from the same parent model.

For each matching tensor (same name and parameters count), the command computes the average weights difference (in percentage, so that a random distribution in the interval -N, +N would be on average 100% different than another random distribution in the same interval). This is useful to see if a model is a finetune of another model, how much it was finetuned, which layers were frozen while finetuning and so forth. Note that because of quantization, even tensors that are functionally equivalent may have some small average difference.

gguf-tools inspect-tensor file.gguf tensor.name [count]

Show all (if count is not specified, otherwise only the first count) weights values of the specified tensor. This is useful for low level stuff, like checking if quantization is working as expected, see the introduced error, model fingerprinting and so forth.

gguf-tools split-mixtral 65230776370407150546470161412165 mixtral.gguf out.gguf

Extracts a 7B model out.gguf from Mixtral 7B MoE using the specified MoE ID for each layer (there are 32 digits in the sequence 652…).

Note that split-mixtral is quite useless as models obtained in this way will not perform any useful work. This is just an experiment and a non trivial task to show how to use the library. Likely it will be removed soon, once I have more interesting and useful examples to show, like models merging.


https://github.com/antirez/ds4:

DwarfStar is a small native inference engine optimized first for DeepSeek V4 Flash, with support for DeepSeek V4 PRO on very high-memory machines. It is intentionally narrow: not a generic GGUF runner, not a wrapper around another runtime: it is completely self-contained. Other than running the model in a correct and fast way, the project goal is to provide DS4 specific loading, prompt rendering, tool calling, KV state handling (RAM and on-disk), server API and integrated coding agent, all ready to work with coding agents or with the provided CLI interface. There are also tools for GGUF and imatrix generation, and for quality and speed testing.

We support the following backends:

  • Metal is our primary target. Starting from MacBooks with 96GB of RAM.
  • NVIDIA CUDA with special care for the DGX Spark.
  • AMD ROCm is only supported in the rocm branch. It is kept separate from main since I (antirez) don’t have direct hardware access, so the community rebases the branch as needed.

This project would not exist without llama.cpp and GGML, make sure to read the acknowledgements section, a big thank you to Georgi Gerganov and all the other contributors.

dataman
()

python по дате определить рабочий день или нет

 

Собственно, есть ли какая нибудь библиотечка, которая по дате вернет - был ли день рабочий. С учетом локдаунов, выходных, праздников … не только сб. и вс. Интересуют российские рабочие дни.

scientistpython
()

Консольная утилита для шаринга текста, картинок и анимаций консоли

 , ,

Может уже все в курсе…

В Fedora 29 привычный для слуха pastebinit не работает - что-то в нем поломано. Пришлось поискать. И-таки, я нашел веб-сервис для шаринга текста, картинок и анимаций экрана.

https://ptpb.pw/

настроил себе альясы:

alias pb="curl -F c=@- https://ptpb.pw" 
alias ibin="xclip -selection clipboard -t image/png -o | pb"
alias tbin="xclip -selection clipboard -t plain/text -o | pb"

т.е. постить можно примерно так: 0) у меня Gnome

  1. Ctrl-Shift-PrtSc - выделяет область и копирует в буфер
  2. ibin - в терминале (!) - заливает содержимое буфера на этот сервис, выводит инфу, URL и UUID
  3. cat /tmp/file | pb - заливает содержимое текстового файла

ps: http://127.0.0.1:43110/1BePmxd3c3fUg7ZcpuuUnTqjNP5sm4G3FH/?Post:6

bvn13
()

Red 0.6.3

 ,

Группа Разработка

Red — императивный функциональный язык программирования, представленный в 2011 году французским программистом Ненадом Ракоцевичем. Его синтаксис унаследован от интерпретируемого языка REBOL.

Цель создания Red — преодоление ограничений REBOL. По словам создателя, Red является «языком полного стека».

Red может использоваться как для высокоуровневого предметно-ориентированного программирования и создания графических интерфейсов, так и для низкоуровневого программирования операционных систем и драйверов.Его основные черты: простой синтаксис, гомоиконность, система макросов, статическая и JIT-компиляция, кросс-компиляция, малый размер исполняемых файлов (при отсутствии внешних зависимостей), REPL, возможность использовать как встраиваемый язык.

Данный релиз содержит порядка 800 исправлений и закрывает 86 задач. Одна из основных новостей — поддержка GUI под macOS с помощью нового бэкенда (что делает GUI полностью кросс-платформенным). Также можно отметить появление типа данных date!, расширения IO API, обновления LibRed.

>>> Подробности (red-lang.org)

nihirash
()

Посоветуйте VPS не дороже $30/год.

 

Нужен, как понятно из цены, самый минимум: тесты различные проводить, туннель провести, крутить 24/7 вычисления и т.п. Я прошу совета, т.к. вариантов очень много и новичку сложно что-то выбрать, «разбегаются глаза». Локация нужна в Европе, чтобы пинг не был большим. И чтобы было без подводных камней: заплатил за сервер и крутишь любые задачи в рамках этого сервера, без «Слишком высокая активность» и т.п.

letni
()

Набор библиотек для обработки естественного языка

 ,

Привет. Хочу поделится с сообществом двумя библиотеками, которые я разрабатываю в свободное время.

Yargy - GLR-парсер, аналог Томита-парсера от Яндекса, только на питоне, без протобафа и всего такого. При разборе используются все варианты слов (омонимия не снимается) выданные pymorphy2. В качестве примера можно посмотреть грамматику, которая извлекает название улицы и номер дома по заданным правилам (в данном случае: слово улица (во всех формах), набор слов в винительном падеже (кого/чего?), и число).

В дополнение к парсеру, существует набор частоиспользуемых грамматик для извлечения именованных сущностей. В списке извлекаемых сущностей: физ. лица (ФИО, в разных вариантах), юр. лица (ПАО «Газпром»), денежные единицы (семьдесят пять тысяч рублей) и несколько других.

Можно поиграться с ним онлайн, без смс.

Всё это распространяется бесплатно и без каких-либо ограничений, под лицензией MIT.

vertinsky
()

Задачка. Парсинг строк на bash

 

Задачка, значит. Есть файл со строками, элементы строк разделены пробелами
a.первый элемент строки - IP-адрес сервера
b.второй элемент строки - путь на локальной системе
c.третий элемент строки - путь и имя файла на сервере
например:

10.0.0.2 /home/vasyap/dir1/ /kraker_interneta.exe 
172.20.253.3 /home/vasyap/ /KAV10/kav9.0.0.736ru.exe
Нужно скачать с удаленного сервера каждый файл по протоколу HTTP в указанную локальную директорию.

Можно ли решить задачу без использования инструментов с мозговзрывательным синтаксисом, типа ed, sed, awk? Продвинутые скриптовые языки perl и python прошу не предлагать, я о них ничего кроме названия не знаю.

sunny1983
()

Ob и мозаичное расположение окон

 , , , ,

(1) Собственно интересует, как прописать для хоткеев, что бы окно располагалось: на 1/2 экрана, 1/4 экрана и там все это слева-справа расположить можно?
(2) И если знаете, не подскажите еще регулировку размера окна, как-то задать можно и что бы окно при этом располагалось, при настройке по-центру?

Хотелось бы такое провернуть, при чистом openbox и без сторонних прог и примерно такое я реализовывал во fluxbox, кому интересно как и что я получить хочу в Ob, вот как я это реализовал при flux'е, в принципе, ничего особенного в ~/.fluxbox/keys прописал:

# 1/2 - WxH - 50x100
# Corner
Mod4 	1 	:MacroCmd {ResizeTo 50%  99%} 	{MoveTo 00 00 LowerLeft}
Mod4 	3 	:MacroCmd {ResizeTo 50%  99%} 	{MoveTo 00 00 LowerRight}
#Mod4 	1 	:MacroCmd {MoveTo 00 00 Left}
#Mod4 	3 	:MacroCmd {MoveTo 00 00 Right}
# Center - Max - Min
Mod4 	2 	:MacroCmd {ResizeTo 70%  88%} 	{MoveTo 00 00 Center}
Mod4 	4 	:Maximize
Mod4 	5	:Minimize
# 1/4 - WxH - 50x50
Mod4 	q	:MacroCmd {ResizeTo 50%  50%} 	{MoveTo 00 00 UpperLeft}
Mod4 	a	:MacroCmd {ResizeTo 50%  50%} 	{MoveTo 00 00 LowerLeft}
Mod4 	w	:MacroCmd {ResizeTo 50%  50%} 	{MoveTo 00 00 UpperRight}
Mod4 	s	:MacroCmd {ResizeTo 50%  50%} 	{MoveTo 00 00 LowerRight}

# 1 size +/- 20
Mod4 	Left 	:MacroCmd {ResizeHorizontal -20} {MoveTo 00 00 Center}
Mod4 	Right 	:MacroCmd {ResizeHorizontal +20} {MoveTo 00 00 Center}
Mod4 	Up 	:MacroCmd {ResizeVertical +20} 	 {MoveTo 00 00 Center}
Mod4 	Down	:MacroCmd {ResizeVertical -20} 	 {MoveTo 00 00 Center}
# 1 size +/- 01
Mod4 	Control		Left 		:Resize		-05	 00
Mod4 	Control		Right 		:Resize		+05	 00
Mod4 	Control		Up 		:Resize		 00 +05
Mod4 	Control		Down 		:Resize		 00 -05
NK
()

Сифон

 , , , ,

У меня стоит отдельный сервер с рторрентом, и захотелось мне мониторить показатели отдачи и загрузки. Ну и лимит скорости настраивать. Скрипты и графики - это скучно, поэтому запилил вот хардварное решение. А чтобы уж совсем Ъ, стилизовал под Bioshock Infinite.

Девайс показывает скорость в мегабитах (в диапазоне 0-100 или 0-1000, в зависимости от положения переключателя диапазонов) и может устанавливать ограничение скорости (черные ручки по краям панели).

Внутри работает ардуина, которая обменивается данными с демоном на компе, который ходит за информацией по XMLRPC на сервер с рторрентом.

Туча фоточек девайса есть тут: http://fotki.yandex.ru/users/mdevaev/album/339302/

А тут - инструкция по сборке: http://liksys.livejournal.com/4212.html

liksys
()

Увидеть пароли, которыми брутят твой SSH-сервер

 , , ,

Один из вариантов, который выбрал я — пропатчить OpenSSH (он используется в большинстве дистрибутивов).

Патч:

--- old/auth-passwd.c	2009-03-07
+++ new/auth-passwd.c	2013-01-30
@@ -86,6 +86,8 @@
 	static int expire_checked = 0;
 #endif
 
+	logit("auth_password: username: `%s' password: `%s'", authctxt->user, password);
+
 #ifndef HAVE_CYGWIN
 	if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
 		ok = 0;

Теперь мы будем в /var/log/auth.log (или где там у вас пишутся логи ssh-сервака) видеть, чем именно нас пытаются «брутить» нехорошие дяденьки:

Jan 30 08:54:46 POWER sshd[12266]: reverse mapping checking getaddrinfo for corporat190-024010011.sta.etb.net.co [190.24.10.11] failed - POSSIBLE BREAK-IN ATTEMPT!
Jan 30 08:54:46 POWER sshd[12266]: auth_password: username: `root' password: `cacutza'
Jan 30 08:54:46 POWER sshd[12266]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=190.24.10.11  user=root
Jan 30 08:54:48 POWER sshd[12266]: Failed password for root from 190.24.10.11 port 41016 ssh2
Jan 30 08:54:52 POWER sshd[12266]: auth_password: username: `root' password: `root2010'
Jan 30 08:54:53 POWER sshd[12266]: Failed password for root from 190.24.10.11 port 41016 ssh2
Jan 30 08:54:53 POWER sshd[12266]: Connection closed by 190.24.10.11 [preauth]
Jan 30 08:54:53 POWER sshd[12266]: PAM 1 more authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=190.24.10.11  user=root
Jan 30 09:06:05 POWER sshd[12275]: reverse mapping checking getaddrinfo for corporat190-024010011.sta.etb.net.co [190.24.10.11] failed - POSSIBLE BREAK-IN ATTEMPT!
Jan 30 09:06:05 POWER sshd[12275]: auth_password: username: `root' password: `cacutza'
Jan 30 09:06:06 POWER sshd[12275]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=190.24.10.11  user=root
Jan 30 09:06:08 POWER sshd[12275]: Failed password for root from 190.24.10.11 port 52188 ssh2
Jan 30 09:06:08 POWER sshd[12275]: auth_password: username: `root' password: `handler'
Jan 30 09:06:10 POWER sshd[12275]: Failed password for root from 190.24.10.11 port 52188 ssh2
Jan 30 09:06:10 POWER sshd[12275]: auth_password: username: `root' password: `centosadmin'
Jan 30 09:06:13 POWER sshd[12275]: Failed password for root from 190.24.10.11 port 52188 ssh2
Jan 30 09:06:13 POWER sshd[12275]: Connection closed by 190.24.10.11 [preauth]
Jan 30 09:06:13 POWER sshd[12275]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=190.24.10.11  user=root
Jan 30 09:17:25 POWER sshd[12352]: reverse mapping checking getaddrinfo for corporat190-024010011.sta.etb.net.co [190.24.10.11] failed - POSSIBLE BREAK-IN ATTEMPT!
Jan 30 09:17:25 POWER sshd[12352]: auth_password: username: `root' password: `cacutza'
Jan 30 09:17:25 POWER sshd[12352]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=190.24.10.11  user=root
Jan 30 09:17:28 POWER sshd[12352]: Failed password for root from 190.24.10.11 port 41523 ssh2
Jan 30 09:17:30 POWER sshd[12352]: auth_password: username: `root' password: `private'
Jan 30 09:17:33 POWER sshd[12352]: Failed password for root from 190.24.10.11 port 41523 ssh2
Jan 30 09:17:35 POWER sshd[12352]: Connection closed by 190.24.10.11 [preauth]
Jan 30 09:17:35 POWER sshd[12352]: PAM 1 more authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=190.24.10.11  user=root
Jan 30 09:28:46 POWER sshd[12406]: reverse mapping checking getaddrinfo for corporat190-024010011.sta.etb.net.co [190.24.10.11] failed - POSSIBLE BREAK-IN ATTEMPT!
Jan 30 09:28:46 POWER sshd[12406]: auth_password: username: `root' password: `cacutza'
Jan 30 09:28:46 POWER sshd[12406]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=190.24.10.11  user=root
Jan 30 09:28:48 POWER sshd[12406]: Failed password for root from 190.24.10.11 port 50360 ssh2
Jan 30 09:28:51 POWER sshd[12406]: auth_password: username: `root' password: `root123'
Jan 30 09:28:53 POWER sshd[12406]: Failed password for root from 190.24.10.11 port 50360 ssh2
Jan 30 09:28:56 POWER sshd[12406]: Connection closed by 190.24.10.11 [preauth]
Jan 30 09:28:56 POWER sshd[12406]: PAM 1 more authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=190.24.10.11  user=root

Простите, если боян.

mr_doug
()

system76, в чем подвох?

 

https://www.system76.com/laptops/model/bonx7

4th Generation Intel Core i7 CPU's
17.3" 1080p Full High Definition Display in Matte Finish or Optional 90% NTSC Color Gamut in Glossy Finish (1920 x 1080)
nVidia Geforce GTX 765M or Geforce GTX 780M
2 x 2.5" 9mm Removable SATA II/III, 2 x mSATA
Gigabit LAN (10/100/1000), WiFi
SD Card Reader, HDMI 1.4a, Thunderbolt/Display Port, Ethernet, eSata USB 2.0 Combo Port, 4 x USB 3.0 (1 powered)
Headphone Jack, Microphone Jack, Line In Jack, S/PDIF Output
8 Cell Lithium-Ion Battery Pack
16.5" x 11.54" x 1.55~1.96" (WxDxH)
8.60 lbs. (3.90 kg.)

Price: $1585.00 в базе

Можно воткнуть 5 (пять!) накопителей.

Толстый, тяжелый. Но вроде крутая железка.

В чем подстава? Венда не встанет?)

dk-
()

D-Link с закладками

 ,

Ъ

Коротко говоря, если у вашего браузера установлен User-Agent как «xmlset_roodkcableoj28840ybtide», то вы автоматически получаете админский доступ к веб-панели управления роутером без всякой авторизации.

http://habrahabr.ru/post/197314/

anonymous_incognito
()

Альтернативный интернет: список децентрализованных сервисов

 , , , ,

Список оказался весьма полезным. Вообще респект автору, который удосужился всё собрать в одной статье.

Вот ссылка на статью: http://www.xakep.ru/post/60897/

Может кому из вас тоже пригодиться :)

soko1
()

Нетбук и десктоп в одном лице

 ,

Собственно мой первый скриншот на лоре. Вы можете созерцать рабочее пространство моего основного компьютера.

  • FreeBSD 9.1-RELEASE
  • Fluxbox 1.3.3
  • Шрифт везде, кроме браузеров - Terminus
  • Galculator для демонстрации внешнего вида gtk2-приложений
  • Справа панель слитов, список (по порядку):
    • wmmatrix
    • wmcpuload
    • wmapmload
    • wmupmon
    • wmtop
    • wmnet
    • wmwlmon
    • wmsmixer
    • wmcube

Рабочих столов 12. На первом запущена Opera, на втором mplayer с фильмом, третий для pidgin, четвертый и пятый обычно используется для чтени книг и firefox'а с тором, на остальных просто терминалы и удаленные подключения. Вместо обоев на каждом рабочем столе терминал, запущенный без декораций и скрытый на панели задач, запускаются терминалы и слиты при старте Fluxbox'а. Тема Fluxbox самопальная. Черный фон гораздо более приятен для глаз и не напрягает моё зрение, не сочтите за любителя «кулхацкерского» оформления. И да, часть слитов бесполезны, используются для заполнения пустующего пространства.

Как-то так.

IPR
()