diff --git a/components/blog/blog.css b/components/blog/blog.css index 7e294b4d..b6ab6ba4 100644 --- a/components/blog/blog.css +++ b/components/blog/blog.css @@ -86,6 +86,10 @@ gap: clamp(32px, 4vw, 56px); align-items: start; } +/* A post's text fills its column up to the sidebar: a narrower measure left an empty strip that read as missing content. */ +.wirecat-blog .blog-article { + --blog-measure: 100%; +} .wirecat-blog .blog-sidebar { position: sticky; top: 20px; diff --git a/content/blog/making-a-reranker-fast/index.es.md b/content/blog/making-a-reranker-fast/index.es.md index 539fac50..23df2eb0 100644 --- a/content/blog/making-a-reranker-fast/index.es.md +++ b/content/blog/making-a-reranker-fast/index.es.md @@ -1,113 +1,82 @@ --- -title: Cómo acelerar un reranker en un portátil, en cuatro actos -description: Procesar por lotes un reranker cuantizado cambió sus respuestas, no su velocidad. Una biblioteca nativa lo hizo 2 veces más rápido, no 10. Distribuirla no necesitó paquetes npm nuevos, y para Windows la biblioteca que hacía falta solo estaba dentro de un archivo npm. -date: 2026-10-27 +title: Cómo hice más rápido un reranker en mi propio ordenador +description: Cuando activé el reranker por defecto, la búsqueda por significado de WireCat pasó de 1.9 a 5.1 segundos. Los lotes casi no ayudaron y cambiaron las puntuaciones, ONNX Runtime nativo puntuó 2 veces más rápido, no 10, y la DLL para Windows solo estaba dentro de un archivo npm. +date: 2026-11-18 tags: [search, benchmarks, cli] cover: ./cover.jpg -coverAlt: "Cincuenta mensajes impresos con una banda top 50, uno leído bajo una lupa, cinco ordenados del 1 al 5 con el primero marcado en verde y un cronómetro en 3,2 segundos" +coverAlt: "Un montón de 50 mensajes impresos con la etiqueta top 50, uno leído con una lupa, 5 ordenados con el primero marcado en verde, un cronómetro en 3.2 segundos" author: viacheslav-ptsarev series: laptop-search glance: - - value: "4,6 s → 3,2 s" - label: "un --discover real: WebAssembly frente a nativo" - href: "#segundo-acto-lo-nativo-fue-2-veces-más-rápido-no-10" + - value: "4.6 s → 3.2 s" + label: "--discover en un archivo real, con WebAssembly y en nativo" + href: "#en-nativo-puntuó-2-veces-más-rápido-no-10" - value: "≤ 15%" - label: "ahorraron los lotes, y las puntuaciones cambiaron" - href: "#primer-acto-los-lotes-cambiaron-las-respuestas-no-la-velocidad" - - value: "113,5 MB" - label: "el archivo npm con la única DLL de Windows que funcionó" - href: "#cuarto-acto-la-biblioteca-de-windows-solo-estaba-dentro-de-un-archivo-npm" + label: "lo máximo que ahorraron los lotes, y las puntuaciones se movieron" + href: "#los-lotes-ahorraron-un-15-y-movieron-las-puntuaciones" + - value: "113.5 MB" + label: "el archivo npm del que saco una DLL para Windows" + href: "#en-windows-la-dll-tuvo-que-salir-de-un-archivo-npm" - value: "5 + Alpine" - label: "sistemas que CI comprueba en nativo; Alpine sigue con WebAssembly" - href: "#cuarto-acto-la-biblioteca-de-windows-solo-estaba-dentro-de-un-archivo-npm" -draft: true + label: "sistemas donde CI ejecuta los modelos en nativo, Alpine sigue en WebAssembly" + href: "#en-windows-la-dll-tuvo-que-salir-de-un-archivo-npm" +draft: false --- -Nuestras CLI buscan en un archivo de mensajería en el propio ordenador del dueño. -`search messages --discover` encuentra candidatos por significado y por palabras, y después un modelo -pequeño, el reranker (mMARCO, 8 bits), lee los 50 primeros y los ordena. Cuando el reranker pasó a estar -activado por defecto, `--discover` pasó de 1,9 a 5,1 s en un archivo real. Estas son las cuatro cosas que -hicimos y lo que nos enseñó cada una. +Cuando activé el reranker por defecto en la búsqueda de WireCat, `search messages --discover` en mi archivo pasó de 1.9 a 5.1 segundos. Probé las 2 cosas obvias: lotes, y ONNX Runtime nativo en lugar de WebAssembly. Los lotes casi no ayudaron y encima cambiaron las puntuaciones, y en nativo la puntuación fue 2 veces más rápida, cuando mi estimación decía 4-10. Y en Windows la DLL que necesitaba solo estaba dentro de un archivo npm de 113.5 MB, así que tuve que sacarla de ahí. -## Primer acto: los lotes cambiaron las respuestas, no la velocidad +`--discover` busca candidatos por significado y por palabras, y luego un modelo pequeño, mMARCO (8 bits), lee los 50 primeros y los ordena, eso es el reranker. Todo corre en local, en la máquina del usuario, sin nube. -La solución obvia es puntuar los 50 pares por lotes: una pasada del modelo para muchos pares en lugar de -una por par. En WebAssembly ahorró como mucho un 15%, y solo con los pares ordenados por longitud. Con -longitudes mezcladas fue más lento: cada par se rellena hasta el más largo, y el relleno cuesta tanto como -el texto. +## Los lotes ahorraron un 15% y movieron las puntuaciones -Peor aún, las puntuaciones se movieron. El mismo par obtuvo 0,04 solo, 0,48 rellenado hasta 200 tokens y -0,34 junto a otro par. El modelo de 8 bits probablemente fija su rango a partir de toda la entrada de cada -pasada, así que los vecinos de lote cambian la puntuación de un par. Un orden que depende de qué -resultados comparten lote no es un orden. Mantuvimos un par por pasada. +Primero probé no ejecutar el modelo 50 veces, una pareja (pregunta y mensaje) cada vez, sino darle las parejas en lotes. En WebAssembly eso ahorró un 15% como mucho, y solo con las parejas ordenadas por longitud. Con parejas de longitudes distintas en un lote iba incluso más lento, porque cada pareja se rellena hasta la más larga y el relleno cuesta lo mismo que el texto real. -| Puntuar 50 pares de longitud mixta | Tiempo | Mayor cambio de puntuación | +Y las puntuaciones cambiaron. La misma pareja sacó 0.04 sola, 0.48 rellenada hasta 200 tokens y 0.34 junto a otra pareja. Creo que el modelo de 8 bits ajusta su rango de valores a toda la entrada de cada ejecución (cuantización dinámica), así que los vecinos del lote mueven la puntuación. Es una hipótesis, no lo investigué más. Pero aunque la causa sea otra, el orden de los resultados dependería de qué mensajes cayeron por azar en el mismo lote, así que me quedé con una pareja por ejecución. + +| 50 parejas de longitudes distintas | Tiempo | Mayor cambio de puntuación | | --- | ---: | ---: | -| Uno a uno | 1,54 s | — | -| Lotes de 5, ordenados por longitud | 1,33 s | 1,01 | -| Un lote de 50 | 2,37 s | 0,85 | - -## Segundo acto: lo nativo fue 2 veces más rápido, no 10 - -Después ejecutamos los mismos modelos con la biblioteca nativa de ONNX Runtime en lugar de su versión -para WebAssembly. Una prueba con textos cortos prometía de 4 a 10 veces. En el archivo real, `--discover` -pasó de 4,58 a 3,20 s, con una respuesta directa entre las cinco primeras en 6 de 6 preguntas conocidas en -ambos casos. - -La diferencia está en la longitud de la entrada. La entrada real del reranker lleva el chat, el autor, la -fecha y el mensaje al que se responde: una mediana de 153 tokens, y una de cada diez supera los 762. La -mediana del conjunto sintético era 48. Por par, lo nativo fue de 2 a 2,5 veces más rápido. Las pruebas con -textos cortos exageran la ganancia para textos largos. - -Más tarde recortamos el mensaje al que se responde a 300 caracteres (esa historia tiene su propio -artículo). Con ambos cambios, la CLI publicada ejecutó `--discover` en 2,91 s en nativo frente a 4,10 s -con WebAssembly. - -## Tercer acto: sin paquetes nuevos - -Lo habitual para llevar una biblioteca nativa a los usuarios de npm es un paquete por plataforma. No -queríamos publicar cinco paquetes nuevos ni agrandar la instalación de quien nunca descarga un modelo. - -El paquete npm `onnxruntime-node` tiene dos partes por plataforma: un conector de 0,4 MB -(`onnxruntime_binding.node`) y la biblioteca. El conector busca la biblioteca en su propia carpeta. Así -que los conectores viajan dentro de un paquete que ya publicamos, y la biblioteca se descarga con los -modelos desde el archivo oficial de la versión de Microsoft, comprobada con un hash sha256 fijado. Una -búsqueda nunca descarga nada: la biblioteca llega solo cuando el usuario ejecuta `models download`. Si -falta o no carga, los modelos funcionan con WebAssembly como antes. En 450 pares las puntuaciones -coincidieron exactamente con las de la biblioteca del propio paquete npm. - -## Cuarto acto: la biblioteca de Windows solo estaba dentro de un archivo npm - -En Windows el mismo truco falló. El conector de Windows importa una función de `onnxruntime.dll` por -número, no por nombre: el ordinal 4, la función de configuración de DirectML, la capa de Windows para la -tarjeta gráfica. La DLL de la versión de Microsoft es la compilación normal, sin esa función, así que el -conector se negaba a cargarla. - -La compilación con DirectML de la versión 1.30.0 no está en el archivo de la versión de Microsoft, y su -paquete NuGet se queda en una versión anterior. La encontramos en un solo sitio: dentro del propio -archivo npm de `onnxruntime-node`, de 113,5 MB. Por eso en Windows `models download` descarga ese -archivo una vez, conserva la única DLL y la comprueba con su propio hash fijado. La parte de DirectML solo -se carga si se usa. - -Después lo comprobamos de verdad. Un nuevo flujo de CI descarga la biblioteca y ejecuta dos modelos de -prueba diminutos en nativo en Linux x64 y arm64, macOS con Apple silicon, Windows x64 y Windows arm64. -También comprueba que a Alpine Linux, que no tiene compilación, no se le ofrece nada y sigue con -WebAssembly. Los seis pasan; las tareas de Windows tardan entre 1,5 y 2 minutos. - -## Lo que le diríamos a quien haga lo mismo - -- Mide con la longitud real de tus entradas. El texto sintético corto hacía que la biblioteca nativa - pareciera hasta cinco veces mejor de lo que es. -- No proceses por lotes un modelo con cuantización dinámica si las puntuaciones de distintos pares deben - ser comparables. -- Una biblioteca nativa se puede descargar bajo demanda, fijada por hash, con WebAssembly como respaldo. - Puede que no necesites un paquete por plataforma. -- Comprueba la biblioteca en cada sistema en CI. Leer la lista de archivos del paquete no es lo mismo que - cargarla. - -## Notas - -Las mediciones, la configuración y los scripts son públicos: -[velocidad del reranker](https://github.com/WireCatLabs/cli-testing/blob/main/performance/search/rerank-speed/README.md). -Los mensajes reales se usaron solo como totales; las preguntas y las filas por pregunta siguen siendo -privadas. +| Una a una | 1.54 s | | +| Lotes de 5, ordenados por longitud | 1.33 s | 1.01 | +| Lotes de 5, en orden de llegada | 2.12 s | 0.78 | +| Un lote de 50 | 2.37 s | 0.85 | + +El texto de esta medición es sintético, las puntuaciones están en logits. La opción más rápida además mueve las puntuaciones más que las demás de la tabla, y los lotes de 25 las movían hasta 1.34. Solo medí en WebAssembly, si los lotes en nativo se comportan igual no lo comprobé. + +## En nativo puntuó 2 veces más rápido, no 10 + +Después ejecuté los mismos modelos con la biblioteca nativa de ONNX Runtime en lugar de WebAssembly. Esperaba 4-10 veces, porque la versión de Python puntuaba 50 parejas sintéticas cortas en 0.2 segundos, y WebAssembly tardaba 0.9-1.7 en mi caso. Pero estaba comparando runtimes distintos de ejecuciones distintas. Cuando ejecuté Node con la biblioteca nativa y WebAssembly con las mismas parejas, salió 0.25-0.30 segundos contra 0.60, o sea 2-2.4 veces. + +En un archivo real salió igual. El reranker no lee solo el mensaje, también recibe el chat, el autor y el mensaje al que responde, así que la mediana fue de 153 tokens contra 48 en el conjunto sintético, y una de cada diez parejas pasaba de 762. Por pareja, nativo es 2-2.5 veces más rápido, pero el `--discover` entero pasó de 4.58 a 3.20 segundos (mediana de 18 llamadas), o sea un 30%. El resto se va en cargar los modelos y los tokenizadores (17 MB de JSON, igual en los dos runtimes), la recolección de basura y la búsqueda en sí. + +Las respuestas siguieron siendo las mismas. En mis 6 preguntas de control la respuesta directa estaba entre los 5 primeros en los dos casos, y de los 30 resultados del top 5 coincidieron 29. Los casi empates a veces cambian de sitio, porque los runtimes puntúan la misma pareja de forma un poco distinta. El punto de partida aquí es 4.58 y no 5.1 porque es otra build y otra carga en la máquina, así que la comparación con 5.1 es solo aproximada. + +También vi que el reranker a veces ni siquiera veía el mensaje encontrado. Esto lo medí aparte, en un solo chat. Ahí, en 18 de 119 parejas con respuesta, el mensaje al que respondía ocupaba los 512 tokens del modelo. Lo recorté a 300 caracteres, de eso escribiré aparte. Con los dos cambios, `--discover` en max 0.81.0 tardaba 2.91 segundos en nativo y 4.10 con WebAssembly. + +## Distribuir lo nativo sin paquetes nuevos + +Lo habitual para distribuir una biblioteca nativa por npm es un paquete aparte por plataforma. No quería más paquetes ni una instalación más pesada para quien nunca descarga modelos. `onnxruntime-node` ocupa 288 MB descomprimido, porque lleva las bibliotecas de todos los sistemas. + +Para cada plataforma tiene 2 partes: un binding de 0.3-0.4 MB y la biblioteca. El binding busca la biblioteca en su propia carpeta, y eso es lo que aproveché - los bindings van en `@wirecat/cli-core-onnx`, que ya se publica, y la biblioteca se descarga con los modelos desde la release oficial de Microsoft y se comprueba contra un sha256 fijo. La búsqueda nunca descarga nada, la biblioteca aparece solo después de `models download`, y si falta o no carga, todo funciona con WebAssembly como antes. Comprobé las puntuaciones en 450 parejas, con la biblioteca de la release de Microsoft coincidieron bit a bit con la de npm. + +## En Windows la DLL tuvo que salir de un archivo npm + +En Windows ese truco no funcionó. El binding de Windows toma una función de `onnxruntime.dll` no por nombre sino por el número 4, y es la función de DirectML (la capa de Windows para la tarjeta gráfica). La release de Microsoft trae la build normal para CPU sin ella, y Windows respondía a la carga solo con "The operating system cannot run %1", sin una palabra sobre lo que faltaba. + +El único sitio donde encontré la build con DirectML de la 1.30.0 fue dentro del propio archivo npm de `onnxruntime-node`, que pesa 113.5 MB. NuGet también la tiene, pero solo hasta la 1.24.4. Así que en Windows `models download` descarga ese archivo una vez, saca una DLL y la comprueba contra un sha256 fijo. DirectML.dll solo se carga si hace falta, así que en CPU todo funciona sin él. Un apaño, sí, pero sin paquetes nuevos. + +Antes de esto, CI solo ejecutaba un modelo de prueba diminuto a través del paquete npm, y nada comprobaba `models download` ni lo que de verdad corre para el usuario después. Ahora un workflow aparte descarga la biblioteca y ejecuta 2 modelos de prueba diminutos en nativo en 5 sistemas: Linux y Windows en x64 y arm64, más macOS en Apple silicon. En Alpine, que no tiene build, comprueba que ni siquiera se ofrece lo nativo y que todo va por WebAssembly. Los Mac Intel también se quedan en WebAssembly, el paquete no trae biblioteca para ellos (y CI tampoco los cubre). + +## Qué haría distinto + +- Compararía los runtimes con las mismas parejas y con la longitud real de la entrada. Mis 4-10 veces salieron de comparar ejecuciones distintas. +- No usaría lotes con un modelo cuantizado si las puntuaciones de parejas distintas se comparan entre sí. +- Una biblioteca nativa se puede descargar bajo demanda, con un hash fijo y WebAssembly para cuando no carga. Al final no necesité un paquete por plataforma. +- Que los archivos estén en un paquete no significa que la biblioteca cargue. Ahora eso lo comprueba CI, que de verdad ejecuta un modelo en cada uno de los 5 sistemas. + +## Qué no medí + +- La velocidad en nativo en Windows, macOS y Linux arm64. CI comprueba que funciona ahí, pero no mide el tiempo. +- El servidor MCP, donde los modelos ya están cargados y solo se acelera la puntuación. +- Un modelo sin cuantizar (fp32), que no debería depender de sus vecinos de lote, pero es más grande y más lento. + +Las mediciones sintéticas, su configuración y los scripts están en [cli-testing](https://github.com/WireCatLabs/cli-testing/blob/main/performance/search/rerank-speed/README.md), se pueden repetir. De mi archivo real solo hay totales, las preguntas y las filas por pregunta son privadas. Si a ti lo nativo te salió más rápido con textos largos, cuéntame con qué mediste y lo comparo con mis números. diff --git a/content/blog/making-a-reranker-fast/index.md b/content/blog/making-a-reranker-fast/index.md index 20a2a114..bd4cffda 100644 --- a/content/blog/making-a-reranker-fast/index.md +++ b/content/blog/making-a-reranker-fast/index.md @@ -1,103 +1,82 @@ --- -title: Making a reranker fast on a laptop, in four acts -description: Batching a quantized reranker changed its answers, not its speed. A native runtime made it 2× faster, not 10×. Shipping that runtime took no new npm packages, and on Windows the library we needed was only inside an npm tarball. -date: 2026-10-27 +title: How I made a reranker faster on my own machine +description: When I turned the reranker on by default, WireCat's meaning search went from 1.9 to 5.1 seconds. Batching barely helped and changed the scores, native ONNX Runtime made scoring 2x faster, not 10x, and the Windows DLL I needed was only inside an npm tarball. +date: 2026-11-18 tags: [search, benchmarks, cli] cover: ./cover.jpg -coverAlt: "Fifty printed message cards banded as top 50, one card read under a loupe, five cards ranked 1 to 5 with the first marked green, and a stopwatch at 3.2 seconds" +coverAlt: "A stack of 50 printed messages banded as top 50, one read under a loupe, 5 laid out in order with the first marked green, a stopwatch at 3.2 seconds" author: viacheslav-ptsarev series: laptop-search glance: - value: "4.6 s → 3.2 s" - label: "a real --discover, WebAssembly against native" - href: "#act-two-native-was-2-faster-not-10" + label: "--discover on a real archive, WebAssembly and native" + href: "#native-made-scoring-2x-faster-not-10x" - value: "≤ 15%" - label: "saved by batching, and the scores changed" - href: "#act-one-batching-changed-the-answers-not-the-speed" + label: "the most batching saved, and the scores moved" + href: "#batching-saved-15-and-moved-the-scores" - value: "113.5 MB" - label: "the npm tarball that held the only Windows DLL that worked" - href: "#act-four-the-windows-library-was-only-inside-an-npm-tarball" + label: "the npm tarball I take one Windows DLL out of" + href: "#on-windows-the-dll-had-to-come-out-of-an-npm-tarball" - value: "5 + Alpine" - label: "systems CI now runs natively; Alpine stays on WebAssembly" - href: "#act-four-the-windows-library-was-only-inside-an-npm-tarball" -draft: true + label: "systems where CI runs the models natively, Alpine stays on WebAssembly" + href: "#on-windows-the-dll-had-to-come-out-of-an-npm-tarball" +draft: false --- -Our CLIs search a messenger archive on the owner's own machine. `search messages --discover` finds -candidates by meaning and by words, then a small reranker model (mMARCO, 8-bit) reads the top 50 and -orders them. When the reranker became the default, `--discover` went from 1.9 s to 5.1 s on a real -archive. These are the four things we did about it, and what each one taught us. +When I turned the reranker on by default in WireCat search, `search messages --discover` on my archive went from 1.9 to 5.1 seconds. I tried the 2 obvious things: batching, and native ONNX Runtime instead of WebAssembly. Batching barely helped and changed the scores on top of that, and native made scoring 2x faster, while my estimate said 4-10x. And on Windows the DLL I needed was only inside a 113.5 MB npm tarball, so I had to take it out of there. -## Act one: batching changed the answers, not the speed +`--discover` finds candidates by meaning and by words, then a small mMARCO model (8-bit) reads the top 50 and puts them in order, that's the reranker. It all runs locally on the user's machine, no cloud. -The obvious fix is to score the 50 pairs in batches: one model run for many pairs instead of one run per -pair. In WebAssembly it saved at most about 15%, and only with pairs sorted by length. Mixed lengths were -slower, because every pair is padded to the longest one and the padding costs as much as the text. +## Batching saved 15% and moved the scores -Worse, the scores moved. The same pair scored 0.04 alone, 0.48 when padded to 200 tokens, and 0.34 next -to one other pair. The 8-bit model probably sets its range from the whole input of each run, so the -neighbours in a batch change a pair's score. A ranking that depends on which hits share a batch is not -a ranking. We kept one pair per run. +First I tried not running the model 50 times, one pair (question and message) at a time, but giving it pairs in batches. In WebAssembly that saved 15% at most, and only with the pairs sorted by length. With pairs of different lengths in one batch it got even slower, because every pair is padded to the longest one and the padding costs as much as real text. -| Scoring 50 mixed pairs | Time | Largest score change | +And the scores changed. The same pair got 0.04 on its own, 0.48 padded to 200 tokens and 0.34 next to one other pair. I think the 8-bit model sets its value range from the whole input of each run (dynamic quantization), so the neighbours in a batch move the score. That's a guess, I didn't dig deeper. But even if the cause is something else, the order of results would depend on which messages happened to share a batch, so I kept one pair per run. + +| 50 pairs of different lengths | Time | Largest score change | | --- | ---: | ---: | -| One by one | 1.54 s | — | +| One by one | 1.54 s | | | Batches of 5, sorted by length | 1.33 s | 1.01 | +| Batches of 5, in arrival order | 2.12 s | 0.78 | | One batch of 50 | 2.37 s | 0.85 | -## Act two: native was 2× faster, not 10× +The text in this run is synthetic, scores are in logits. The fastest option also moves the scores more than the others in the table, and batches of 25 moved them by up to 1.34. I measured only in WebAssembly, whether native batches behave the same I didn't check. + +## Native made scoring 2x faster, not 10x + +Next I ran the same models through ONNX Runtime's native library instead of WebAssembly. I expected 4-10x, because the Python version scored 50 short synthetic pairs in 0.2 seconds, while WebAssembly took 0.9-1.7 on my side. But I was comparing different runtimes from different runs. When I ran Node with the native library and WebAssembly on the same pairs, it was 0.25-0.30 seconds against 0.60, so 2-2.4x. + +On a real archive it came out the same. The reranker reads more than the message, it also gets the chat, the author and the message it replies to, so the median was 153 tokens against 48 in the synthetic set, and every tenth pair was longer than 762. Per pair native is 2-2.5x faster, but the whole `--discover` went from 4.58 to 3.20 seconds (median of 18 calls), so 30%. The rest is loading the models and tokenizers (17 MB of JSON, the same in both runtimes), garbage collection and the search itself. -Next we ran the same models through ONNX Runtime's native library instead of its WebAssembly build. A -short-text benchmark promised 4–10×. On the real archive, `--discover` went from 4.58 s to 3.20 s, with -a direct answer in the top five for 6 of 6 known questions on both runtimes. +The answers stayed the same. On my 6 known questions the direct answer was in the top 5 either way, and 29 of the 30 top-5 hits matched. Near-ties sometimes swap places, because the runtimes score the same pair slightly differently. The starting point here is 4.58, not 5.1, because it's another build and another load on the machine, so a comparison with 5.1 is only rough. -The gap is the input length. Real reranker inputs carry the chat, the author, the date and the message -being replied to: a median of 153 tokens, and one in ten longer than 762. The synthetic set's median was -48. Per pair, native was 2–2.5× faster. Benchmarks on short text overstate the gain for long text. +I also noticed that the reranker sometimes never saw the hit at all. I measured this separately, on one chat. There, in 18 of 119 pairs with a reply, the message it replied to took all 512 of the model's tokens. I cut it to 300 characters, I'll write about that separately. With both changes `--discover` in max 0.81.0 took 2.91 seconds natively and 4.10 through WebAssembly. -A later fix cut the replied-to message to 300 characters (that story is its own post). With both -changes, the released CLI ran `--discover` in 2.91 s natively against 4.10 s through WebAssembly. +## Shipping native without new packages -## Act three: no new packages +The usual way to ship a native library through npm is a separate package per platform. I didn't want more packages and a bigger install for people who never download models. `onnxruntime-node` itself is 288 MB unpacked, because it has the libraries of every system in it. -The usual way to ship a native library to npm users is one package per platform. We did not want five -new packages to publish, or a bigger install for people who never download a model. +For each platform it has 2 parts: a 0.3-0.4 MB binding and the library. The binding looks for the library in its own folder, and I used that - the bindings went into `@wirecat/cli-core-onnx`, which is published anyway, and the library is downloaded with the models from Microsoft's official release and checked against a pinned sha256. Search never downloads anything, the library shows up only after `models download`, and if it's missing or doesn't load, everything runs through WebAssembly as before. I checked the scores on 450 pairs, with the library from Microsoft's release they matched the npm one bit for bit. -The npm package `onnxruntime-node` has two parts per platform: a 0.4 MB connector -(`onnxruntime_binding.node`) and the library itself. The connector looks for the library in its own -folder. So the connectors ride inside a package we already publish, and the library is downloaded with -the models, from Microsoft's official release archive, checked against a pinned sha256 hash. A search -never downloads anything; the library arrives only when the user runs `models download`. If it is -missing or does not load, the models run through WebAssembly as before. On 450 pairs the scores matched -the npm package's own library exactly. +## On Windows the DLL had to come out of an npm tarball -## Act four: the Windows library was only inside an npm tarball +On Windows that trick didn't work. The Windows binding takes a function from `onnxruntime.dll` not by name but by number 4, and that's the DirectML function (DirectML is the Windows layer for the graphics card). Microsoft's release has the plain CPU build without it, and Windows answered the load with just "The operating system cannot run %1", not a word about what's missing. -The same trick failed on Windows. The Windows connector imports one function from `onnxruntime.dll` by -number, not by name: ordinal 4, the setup function for DirectML, Windows' GPU layer. Microsoft's release -DLL is the plain build, without that function, so the connector refused to load it. +The only place I found the DirectML build of 1.30.0 was inside `onnxruntime-node`'s own npm tarball, which is 113.5 MB. NuGet has it too, but only up to 1.24.4. So on Windows `models download` fetches that tarball once, takes one DLL out of it and checks it against a pinned sha256. DirectML.dll itself loads only when needed, so the CPU path works without it. A bit hacky, sure, but no new packages. -The DirectML build of version 1.30.0 is not in Microsoft's release archive, and its NuGet package stops -at an older version. We found it in one place: inside `onnxruntime-node`'s own 113.5 MB npm tarball. So on -Windows, `models download` fetches that tarball once, keeps the one DLL, and checks it against its own -pinned hash. The DirectML part loads only if it is used. +Before this, CI ran only a tiny test model through the npm package, and nothing checked `models download` and what actually runs for the user after it. Now a separate workflow downloads the library and runs 2 tiny test models natively on 5 systems: Linux and Windows on x64 and arm64, plus macOS on Apple silicon. On Alpine, which has no build, it checks that native isn't even offered and everything goes through WebAssembly. Intel Macs stay on WebAssembly too, the package has no library for them (and CI doesn't cover them either). -Then we checked it for real. A new CI workflow downloads the library and runs two tiny test models -natively on Linux x64 and arm64, macOS on Apple silicon, Windows x64 and Windows arm64. It also checks -that Alpine Linux, which has no build, is offered nothing and stays on WebAssembly. All six pass; the -Windows jobs take 1.5–2 minutes. +## What I'd do differently -## What we would tell someone doing the same +- I'd compare runtimes on the same pairs and at the real input length. My 4-10x came from comparing different runs. +- I wouldn't batch a quantized model if the scores of different pairs have to be compared with each other. +- A native library can be downloaded on demand, with a pinned hash and WebAssembly for when it doesn't load. I never needed a package per platform. +- Files being in a package doesn't mean the library loads. For me that's now checked by CI, which really runs a model on each of the 5 systems. -- Measure on your real input lengths. Short synthetic text made the native runtime look up to five times - better than it was. -- Do not batch a dynamically quantized model if its scores must be comparable across pairs. -- A native library can be downloaded on demand, pinned by hash, with WebAssembly as the fallback. You - may not need a package per platform. -- Check the library on every system in CI. Reading the package listing is not the same as loading it. +## What I didn't measure -## Notes +- Native speed on Windows, macOS and Linux arm64. CI checks that it works there, but doesn't time it. +- The MCP server, where the models are already loaded and only scoring gets faster. +- A model without quantization (fp32), which shouldn't depend on its batch neighbours but is bigger and slower. -The measurements, the setup and the scripts are public: -[reranker speed](https://github.com/WireCatLabs/cli-testing/blob/main/performance/search/rerank-speed/README.md). -Real messages were used only as totals; the questions and the per-question rows stay private. +The synthetic runs, their setup and scripts are in [cli-testing](https://github.com/WireCatLabs/cli-testing/blob/main/performance/search/rerank-speed/README.md), you can repeat them. From my real archive there are only totals, the questions and per-question rows stay private. If native came out faster for you on long texts, tell me what you measured on and I'll compare with my numbers. diff --git a/content/blog/making-a-reranker-fast/index.ru.md b/content/blog/making-a-reranker-fast/index.ru.md index b7598ca2..2d5e59b0 100644 --- a/content/blog/making-a-reranker-fast/index.ru.md +++ b/content/blog/making-a-reranker-fast/index.ru.md @@ -1,106 +1,82 @@ --- -title: Как ускорить переранжировщик на ноутбуке, в четырёх актах -description: Пакетная обработка квантованного переранжировщика изменила его ответы, а не скорость. Нативная библиотека ускорила его в 2 раза, а не в 10. Для её поставки не понадобилось новых npm-пакетов, а для Windows нужная библиотека нашлась только внутри npm-архива. -date: 2026-10-27 +title: Как я ускорял реранкер на своем компьютере +description: Когда я включил реранкер по умолчанию, поиск по смыслу в WireCat стал отвечать за 5.1 секунды вместо 1.9. Батчи почти не помогли и поменяли оценки, нативный ONNX Runtime ускорил оценку в 2 раза, а не в 10, а DLL для Windows я нашел только внутри npm-архива. +date: 2026-11-18 tags: [search, benchmarks, cli] cover: ./cover.jpg -coverAlt: "Пятьдесят распечатанных сообщений в пачке с надписью top 50, одно читают под лупой, пять разложены по порядку от 1 до 5, первое отмечено зелёным, секундомер показывает 3,2 секунды" +coverAlt: "Пачка из 50 распечатанных сообщений с надписью top 50, одно читают под лупой, 5 лежат по порядку, первое отмечено зеленым, секундомер показывает 3.2 секунды" author: viacheslav-ptsarev series: laptop-search glance: - - value: "4,6 с → 3,2 с" - label: "настоящий --discover: WebAssembly против натива" - href: "#акт-второй-натив-быстрее-в-2-раза-а-не-в-10" + - value: "4.6 с → 3.2 с" + label: "--discover на реальном архиве, через WebAssembly и нативно" + href: "#натив-ускорил-оценку-в-2-раза-а-не-в-10" - value: "≤ 15%" - label: "сэкономили пакеты, и оценки при этом поплыли" - href: "#акт-первый-пакеты-изменили-ответы-а-не-скорость" - - value: "113,5 МБ" - label: "npm-архив с единственной подходящей DLL для Windows" - href: "#акт-четвёртый-библиотека-для-windows-была-только-внутри-npm-архива" + label: "максимум, что дали батчи, и оценки при этом поплыли" + href: "#батчи-дали-15-и-сдвинули-оценки" + - value: "113.5 МБ" + label: "весит npm-архив, из которого я достаю одну DLL для Windows" + href: "#на-windows-dll-пришлось-доставать-из-npm-архива" - value: "5 + Alpine" - label: "систем CI проверяет нативно; Alpine остаётся на WebAssembly" - href: "#акт-четвёртый-библиотека-для-windows-была-только-внутри-npm-архива" -draft: true + label: "систем, где CI запускает модели нативно, Alpine остается на WebAssembly" + href: "#на-windows-dll-пришлось-доставать-из-npm-архива" +draft: false --- -Наши CLI ищут по архиву мессенджера на компьютере самого владельца. `search messages --discover` находит -кандидатов по смыслу и по словам, а потом небольшая модель-переранжировщик (mMARCO, 8 бит) читает первые -50 и расставляет их по порядку. Когда переранжировщик включили по умолчанию, `--discover` на настоящем -архиве замедлился с 1,9 до 5,1 с. Вот четыре шага, которые мы сделали, и чему научил каждый. +Когда я включил реранкер в поиске WireCat по умолчанию, `search messages --discover` на моем архиве стал отвечать за 5.1 секунды вместо 1.9. Я попробовал 2 очевидные вещи: батчи и нативный ONNX Runtime вместо WebAssembly. Батчи почти ничего не дали, еще и оценки поменяли, а натив ускорил оценку в 2 раза, хотя по прикидкам выходило 4-10. Плюс на Windows нужная DLL нашлась только внутри npm-архива на 113.5 МБ, и мне пришлось доставать ее оттуда. -## Акт первый: пакеты изменили ответы, а не скорость +`--discover` ищет кандидатов по смыслу и по словам, а потом маленькая модель mMARCO (8 бит) читает первые 50 и расставляет их по порядку, это и называется реранкер. Все крутится локально на машине пользователя, без облака. -Очевидное решение — оценивать 50 пар пакетами: один прогон модели на много пар вместо прогона на каждую. -В WebAssembly это сэкономило не больше 15%, и только когда пары отсортированы по длине. Пары разной длины -шли медленнее: каждую дополняют до самой длинной, и дополнение стоит столько же, сколько текст. +## Батчи дали 15% и сдвинули оценки -Хуже того, оценки поплыли. Одна и та же пара получила 0,04 одна, 0,48 с дополнением до 200 токенов и 0,34 -рядом с другой парой. 8-битная модель, вероятно, подбирает свой диапазон по всему входу каждого -прогона, поэтому соседи по пакету меняют оценку пары. Порядок, который зависит от того, какие результаты -попали в один пакет, — это не порядок. Мы оставили одну пару на прогон. +Сначала я попробовал не гонять модель 50 раз по одной паре (вопрос и сообщение), а давать ей пары пачками. В WebAssembly это сэкономило максимум 15%, и то если отсортировать пары по длине. А когда в пачке пары разной длины, становится даже медленнее, потому что каждую дополняют до самой длинной и это дополнение считается как обычный текст. -| Оценка 50 пар разной длины | Время | Наибольшее изменение оценки | +И оценки поменялись. Одна и та же пара получила 0.04, когда шла одна, 0.48, когда ее дополнили до 200 токенов, и 0.34 рядом с другой парой. Мне кажется, 8-битная модель подбирает диапазон значений по всему входу за прогон (динамическое квантование), и соседи по пачке двигают оценку. Это гипотеза, глубже я не копал. Но даже если причина другая, порядок результатов зависел бы от того, какие сообщения случайно попали в одну пачку, поэтому я оставил по одной паре на прогон. + +| 50 пар разной длины | Время | Максимальный сдвиг оценки | | --- | ---: | ---: | -| По одной | 1,54 с | — | -| Пакеты по 5, по длине | 1,33 с | 1,01 | -| Один пакет из 50 | 2,37 с | 0,85 | +| По одной | 1.54 с | | +| Пачки по 5, отсортированы по длине | 1.33 с | 1.01 | +| Пачки по 5, как пришли | 2.12 с | 0.78 | +| Одна пачка из 50 | 2.37 с | 0.85 | + +Текст в этом замере синтетический, оценки в логитах. Самый быстрый вариант еще и сдвигает оценки сильнее остальных в таблице, а пачки по 25 сдвигали до 1.34. Мерил я только в WebAssembly, ведут ли себя так же батчи в нативной библиотеке, не проверял. + +## Натив ускорил оценку в 2 раза, а не в 10 + +Дальше я запустил те же модели через нативную библиотеку ONNX Runtime, а не через WebAssembly. Я ждал ускорения в 4-10 раз, потому что Python-версия на коротких синтетических парах оценивала 50 пар за 0.2 секунды, а WebAssembly у меня тратил на то же 0.9-1.7. Но это я сравнивал разные рантаймы из разных прогонов. Когда я прогнал Node с нативной библиотекой и WebAssembly на одних и тех же парах, вышло 0.25-0.30 секунды против 0.60, т.е. в 2-2.4 раза. -## Акт второй: натив быстрее в 2 раза, а не в 10 +На реальном архиве получилось так же. Реранкер читает не только сообщение, к нему еще добавляются чат, автор и сообщение, на которое ответили, поэтому медиана получилась 153 токена против 48 в синтетике, а каждая десятая пара длиннее 762. В пересчете на пару натив быстрее в 2-2.5 раза, но вся команда `--discover` ускорилась с 4.58 до 3.20 секунды (медиана 18 вызовов), т.е. на 30%. Остальное время уходит на загрузку моделей и токенизаторов (17 МБ JSON, одинаково в обоих рантаймах), сборку мусора и сам поиск. -Затем мы запустили те же модели через нативную библиотеку ONNX Runtime вместо её сборки для WebAssembly. -Замер на коротком тексте обещал ускорение в 4–10 раз. На настоящем архиве `--discover` ускорился с 4,58 -до 3,20 с, и в обоих случаях прямой ответ был в первой пятёрке у 6 из 6 известных вопросов. +Ответы при этом остались те же. На моих 6 контрольных вопросах прямой ответ был в первой пятерке и там и там, а из 30 результатов в топ-5 совпали 29. Порядок почти равных результатов иногда меняется, потому что рантаймы считают одну и ту же пару чуть по-разному. Стартовая цифра здесь 4.58, а не 5.1, потому что это другая сборка и другая нагрузка на машину, так что сравнивать с 5.1 можно только грубо. -Разница — в длине входа. Настоящий вход переранжировщика несёт чат, автора, дату и сообщение, на которое -ответили: медиана 153 токена, и каждый десятый длиннее 762. В синтетическом наборе медиана была 48. На -одну пару натив был быстрее в 2–2,5 раза. Замеры на коротком тексте завышают выигрыш для длинного. +Еще я заметил, что реранкер иногда вообще не видел найденное сообщение. Это я мерил отдельно, на одном чате. Там в 18 из 119 пар с ответом все 512 токенов модели занимало сообщение, на которое ответили. Я обрезал его до 300 символов, про это напишу отдельно. С обоими изменениями `--discover` в max 0.81.0 отрабатывал за 2.91 секунды нативно и за 4.10 через WebAssembly. -Позже мы обрезали сообщение, на которое ответили, до 300 знаков (это отдельный пост). С обоими -изменениями выпущенный CLI выполнял `--discover` за 2,91 с нативно против 4,10 с через WebAssembly. +## Как раздать натив без новых пакетов -## Акт третий: без новых пакетов +Обычно нативную библиотеку раздают через npm отдельным пакетом под каждую платформу. Я не хотел плодить пакеты и раздувать установку тем, кто модели вообще не качает. Сам `onnxruntime-node` в распакованном виде весит 288 МБ, потому что в нем лежат библиотеки сразу всех систем. -Обычно нативную библиотеку поставляют пользователям npm отдельным пакетом на каждую платформу. Мы не -хотели публиковать пять новых пакетов и раздувать установку у тех, кто никогда не скачивает модели. +Под каждую платформу там 2 части: биндинг на 0.3-0.4 МБ и сама библиотека. Биндинг ищет библиотеку в своей же папке, этим я и воспользовался - биндинги положил в пакет `@wirecat/cli-core-onnx`, который и так публикуется, а библиотека качается вместе с моделями из официального релиза Microsoft и сверяется с зашитым sha256. Сам поиск ничего не качает, библиотека появляется только после `models download`, а если ее нет или она не загрузилась, все работает через WebAssembly, как раньше. Оценки я сверил на 450 парах, с библиотекой из релиза Microsoft они совпали с npm-версией бит в бит. -В npm-пакете `onnxruntime-node` на каждую платформу две части: связка на 0,4 МБ -(`onnxruntime_binding.node`) и сама библиотека. Связка ищет библиотеку в своей же папке. Поэтому связки -едут внутри пакета, который мы уже публикуем, а библиотека скачивается вместе с моделями из официального -архива выпуска Microsoft и сверяется с закреплённым хешем sha256. Поиск сам ничего не скачивает: -библиотека появляется, только когда пользователь запускает `models download`. Если её нет или она не -загружается, модели работают через WebAssembly, как раньше. На 450 парах оценки точно совпали с -библиотекой из самого npm-пакета. +## На Windows DLL пришлось доставать из npm-архива -## Акт четвёртый: библиотека для Windows была только внутри npm-архива +На Windows этот трюк не прокатил. Биндинг для Windows берет из `onnxruntime.dll` функцию не по имени, а по номеру 4, и это функция для DirectML (слой Windows для видеокарты). В релизе Microsoft лежит обычная CPU-сборка без нее, и Windows на попытку загрузки отвечала только "The operating system cannot run %1", без слова о том, чего не хватает. -В Windows тот же приём не сработал. Связка для Windows берёт одну функцию из `onnxruntime.dll` по номеру, а -не по имени: порядковый номер 4, функцию настройки DirectML — слоя Windows для видеокарты. В выпуске -Microsoft лежит обычная сборка DLL, без этой функции, поэтому связка отказывалась её загружать. +DirectML-сборку версии 1.30.0 я нашел только внутри npm-архива самого `onnxruntime-node`, а он весит 113.5 МБ. В NuGet она тоже есть, но только до версии 1.24.4. Поэтому на Windows `models download` один раз качает этот архив, достает из него одну DLL и сверяет ее с зашитым sha256. Сам DirectML.dll подгружается, только если он нужен, так что на CPU все работает и без него. Получился колхоз, конечно, зато новых пакетов не понадобилось. -Сборки 1.30.0 с DirectML нет ни в архиве выпуска Microsoft, ни в NuGet — там она кончается на более -старой версии. Мы нашли её в одном месте: внутри собственного npm-архива `onnxruntime-node` на 113,5 МБ. -Поэтому в Windows `models download` один раз скачивает этот архив, оставляет одну DLL и сверяет её со -своим закреплённым хешем. Часть DirectML загружается, только если она нужна. +До этого CI запускал через npm-пакет только крошечную тестовую модель, а `models download` и то, что после него реально работает у пользователя, не проверял нигде. Теперь отдельный workflow качает библиотеку и запускает 2 крошечные тестовые модели нативно на 5 системах: Linux и Windows на x64 и arm64 плюс macOS на Apple silicon. А на Alpine, для которого сборки нет, проверяет, что натив даже не предлагается и все идет через WebAssembly. Intel Mac тоже остается на WebAssembly, под него библиотеки в пакете нет (и в CI его тоже нет). -Потом мы проверили это по-настоящему. Новый процесс в CI скачивает библиотеку и запускает две крошечные -тестовые модели нативно на Linux x64 и arm64, macOS на Apple silicon, Windows x64 и Windows arm64. Ещё он -проверяет, что Alpine Linux, для которого сборки нет, ничего не предлагается и он остаётся на -WebAssembly. Все шесть проходят; задания в Windows занимают 1,5–2 минуты. +## Что я бы сделал по-другому -## Что мы бы сказали тому, кто делает то же +- Я бы сравнивал рантаймы на одних и тех же парах и на реальной длине входа. 4-10 раз у меня получились потому, что я сравнивал разные прогоны. +- Квантованную модель я бы батчами не гонял, если оценки разных пар потом сравниваются между собой. +- Нативную библиотеку можно качать по требованию, с зашитым хешем и WebAssembly на случай, если она не загрузилась. Мне пакет под каждую платформу так и не понадобился. +- То, что файлы лежат в пакете, еще не значит, что библиотека загрузится. У меня это теперь проверяет CI, который реально запускает модель на каждой из 5 систем. -- Мерьте на настоящей длине входа. Короткий синтетический текст показывал нативную библиотеку до пяти раз - лучше, чем она есть. -- Не обрабатывайте пакетами модель с динамическим квантованием, если оценки разных пар должны быть - сравнимы. -- Нативную библиотеку можно скачивать по требованию, с закреплённым хешем и WebAssembly как запасным - вариантом. Пакет на каждую платформу может и не понадобиться. -- Проверяйте библиотеку на каждой системе в CI. Прочитать список файлов пакета — не то же самое, что её - загрузить. +## Что я не мерил -## Примечания +- Скорость натива на Windows, macOS и Linux arm64. CI проверяет, что он там работает, но время не замеряет. +- MCP-сервер, где модели уже загружены и ускорится только сама оценка. +- Модель без квантования (fp32), которая не должна зависеть от соседей по пачке, но больше и медленнее. -Замеры, условия и скрипты открыты: -[скорость переранжирования](https://github.com/WireCatLabs/cli-testing/blob/main/performance/search/rerank-speed/README.md). -Настоящие сообщения использованы только в виде итогов; вопросы и строки по каждому вопросу остаются -закрытыми. +Синтетические замеры, условия и скрипты лежат в [cli-testing](https://github.com/WireCatLabs/cli-testing/blob/main/performance/search/rerank-speed/README.md), их можно повторить. От моего реального архива там только итоговые цифры, сами вопросы и строки по каждому вопросу закрыты. Если у вас натив на длинных текстах вышел быстрее, напишите, на чем мерили, я сравню со своими цифрами. diff --git a/content/blog/wirecat-desktop-0-7/cover.es.jpg b/content/blog/wirecat-desktop-0-7/cover.es.jpg new file mode 100644 index 00000000..f031f2e7 Binary files /dev/null and b/content/blog/wirecat-desktop-0-7/cover.es.jpg differ diff --git a/content/blog/wirecat-desktop-0-7/cover.jpg b/content/blog/wirecat-desktop-0-7/cover.jpg new file mode 100644 index 00000000..7c135902 Binary files /dev/null and b/content/blog/wirecat-desktop-0-7/cover.jpg differ diff --git a/content/blog/wirecat-desktop-0-7/cover.ru.jpg b/content/blog/wirecat-desktop-0-7/cover.ru.jpg new file mode 100644 index 00000000..83708bd4 Binary files /dev/null and b/content/blog/wirecat-desktop-0-7/cover.ru.jpg differ diff --git a/content/blog/wirecat-desktop-0-7/documents-en.webp b/content/blog/wirecat-desktop-0-7/documents-en.webp new file mode 100644 index 00000000..a3022119 Binary files /dev/null and b/content/blog/wirecat-desktop-0-7/documents-en.webp differ diff --git a/content/blog/wirecat-desktop-0-7/documents-es.webp b/content/blog/wirecat-desktop-0-7/documents-es.webp new file mode 100644 index 00000000..ff9a341f Binary files /dev/null and b/content/blog/wirecat-desktop-0-7/documents-es.webp differ diff --git a/content/blog/wirecat-desktop-0-7/documents-ru.webp b/content/blog/wirecat-desktop-0-7/documents-ru.webp new file mode 100644 index 00000000..8a2f5645 Binary files /dev/null and b/content/blog/wirecat-desktop-0-7/documents-ru.webp differ diff --git a/content/blog/wirecat-desktop-0-7/index.es.md b/content/blog/wirecat-desktop-0-7/index.es.md new file mode 100644 index 00000000..0f9e0862 --- /dev/null +++ b/content/blog/wirecat-desktop-0-7/index.es.md @@ -0,0 +1,81 @@ +--- +title: "WireCat Desktop 0.7: llamadas y reuniones junto a tus chats y tu CRM" +description: Ve tus reuniones, llamadas y eventos del calendario en una página, y las llamadas de una negociación de Bitrix24 en su propia ficha, con la grabación a un clic. Notion viene incluido, una bóveda de Obsidian se conecta con un clic y la página Herramientas instala y actualiza todo de una vez. +date: 2026-11-17 +tags: [release-notes] +cover: ./cover.es.jpg +coverAlt: "WireCat Desktop 0.7 junto a la página Reuniones en modo oscuro, con una semana de standups, una revisión de diseño, una llamada con un proveedor, una revisión del consejo y dos llamadas de teléfono en la cuadrícula." +author: viacheslav-ptsarev +draft: false +--- + +WireCat Desktop instala las herramientas de WireCat, inicia sesión por ti y le da a tu agente de IA tus chats, correo, reuniones, documentos y notas. Todo queda en tu ordenador. En la 0.7 las reuniones y llamadas están junto a tus chats y tu CRM: las ves todas en una página, y una negociación de Bitrix24 muestra las llamadas de sus personas, con la grabación a un clic. + +## Ve todas tus reuniones y llamadas en una página + +La nueva página **Reuniones** muestra tus reuniones, llamadas y eventos del calendario juntos, por semana, por mes o +como tabla. Las reuniones a la misma hora se colocan una al lado de otra, como en Google Calendar, y un campo de +búsqueda encuentra una reunión por sus palabras. + +![La página Reuniones con una semana de standups, revisiones y llamadas de teléfono en la cuadrícula](./meetings-es.webp "Una semana de reuniones y llamadas. Un icono de teléfono marca cada llamada.") + +Abre una reunión para ver quién aceptó la invitación y quién la rechazó, los enlaces para unirse, el resumen y la +transcripción, donde puedes buscar cualquier palabra. La ficha también muestra los archivos de Drive adjuntos al +evento del calendario, y un botón abre el propio evento en Google Calendar. + +Google Meet guarda sus transcripciones y las notas de Gemini en el Drive de quien organiza, a menudo fuera de las +carpetas que elegiste para WireCat. Ahora, después de iniciar sesión en Drive, WireCat te pregunta si quieres +añadirlas. + +## Escucha tus llamadas junto a tus clientes + +WireCat ya puede instalar la herramienta de Asterisk. Conecta tu centralita Asterisk y cada llamada se guarda como una +reunión, con su grabación, y con su transcripción cuando la hay. Le dices en qué países están tus líneas, así que quien +llama sin prefijo de país llega igualmente al contacto correcto. + +La ficha de una negociación o un lead de Bitrix24 muestra las llamadas de las personas que aparecen en ella. Cada +llamada dice si fue entrante o saliente, quién era el gestor y el número del cliente. Una llamada con la grabación en +tu ordenador tiene un botón **Escuchar**, y la oyes en la misma ficha. La empresa de una negociación se abre en su +propia ficha, con sus personas, sus negociaciones y leads abiertos y cuántas llamadas tuvieron sus personas. + +## Busca en tus páginas de Notion + +Notion viene incluido ahora. Inicia sesión con un token de Notion, y WireCat copia a tu ordenador las páginas y bases +de datos que ese token puede ver, para que puedas buscar en ellas y tu agente pueda leerlas. + +## Trae tus notas y documentos + +La ficha de notas tiene ahora **Conectar una bóveda de Obsidian**, y muestra las bóvedas que Obsidian ya conoce, cada +una con su botón para conectarla. + +La nueva página **Documentos** muestra todos los documentos que guarda WireCat, de Drive, de tus carpetas de notas y de +tus importaciones, en una tabla que puedes filtrar por cuenta o por carpeta. Abre uno para leer su texto y ver las +personas y reuniones que menciona. + +![La página Documentos con una tabla de documentos de Google, hojas de cálculo, PDF y notas, dónde está cada uno y cuándo cambió](./documents-es.webp "Todos los documentos que guarda WireCat, en una tabla.") + +## Instala y actualiza todas las herramientas de una vez + +La página Herramientas ahora agrupa las herramientas según quién las hace, primero las incluidas y después las +herramientas adicionales de WireCat. **Instalar todo** instala todas las herramientas incluidas que aún no tienes, y +**Actualizar todo** actualiza todas las instaladas que tienen una versión nueva. Las herramientas que añadiste tú +quedan fuera, porque cada una de sus actualizaciones pasa por su propia revisión. + +## Cosas más pequeñas + +- **Ve tus reglas de correo.** El menú de una cuenta de Email tiene **Reglas de correo**, con lo que detecta cada + regla y lo que hace. +- **Instala sin aceptar la licencia.** La imagen de disco de macOS y el instalador de Windows ya no te piden aceptar + la licencia. La licencia sigue viniendo con la app. +- **Cuenta los avisos sin leer en Ubuntu.** El icono del dock muestra cuántos avisos de la campana no has leído. + +## Descárgala + +Si tienes la 0.6, la app te ofrece la actualización ella sola. ¿Eres nuevo? Descarga WireCat en +[wirecat.dev/es/download](/es/download) para macOS, Windows o Linux. La [guía de Desktop](/es/docs/desktop) cubre +cada página, y cada versión de la 0.6.2 a la 0.7.0 tiene sus propias +[notas de la versión en GitHub](https://github.com/WireCatLabs/wirecat-desktop/releases). + +Reuniones y Documentos están marcadas como beta, con una β pequeña junto al nombre. Las ideas de qué hacer después van +en [la página de ideas](/es/ideas), y las preguntas en [Discord](https://discord.gg/DebENqbRrJ) o en +[GitHub](https://github.com/WireCatLabs/wirecat-desktop/issues). Lo leo todo. diff --git a/content/blog/wirecat-desktop-0-7/index.md b/content/blog/wirecat-desktop-0-7/index.md new file mode 100644 index 00000000..18eeec36 --- /dev/null +++ b/content/blog/wirecat-desktop-0-7/index.md @@ -0,0 +1,77 @@ +--- +title: "WireCat Desktop 0.7: calls and meetings next to your chats and your CRM" +description: See your meetings, calls and calendar events on one page, and the calls of a Bitrix24 deal right on its card, with the recording a click away. Notion is built in now, an Obsidian vault connects in one click, and the Tools page installs and updates everything at once. +date: 2026-11-17 +tags: [release-notes] +cover: ./cover.jpg +coverAlt: "WireCat Desktop 0.7 next to the Meetings page in dark mode, showing one week with standups, a design review, a vendor call, a board review and two phone calls in the grid." +author: viacheslav-ptsarev +draft: false +--- + +WireCat Desktop installs the WireCat tools, signs you in and gives your AI agent your chats, mail, meetings, documents and notes. It all stays on your computer. In 0.7 meetings and calls sit next to your chats and your CRM: you see all of them on one page, and a Bitrix24 deal shows the calls of its people, with the recording one click away. + +## See every meeting and call on one page + +The new **Meetings** page shows your meetings, calls and calendar events together, by week, by month or as a table. +Meetings at the same time sit side by side, as in Google Calendar, and a search field finds a meeting by its words. + +![The Meetings page with one week of standups, reviews and phone calls in the grid](./meetings-en.webp "A week of meetings and calls. A phone icon marks a call.") + +Open a meeting to see who accepted the invitation and who declined, the join links, the summary and the transcript, +where you can find any word. The card also lists the files attached to the calendar event in Drive, and **Open in +Google Calendar** takes you to the event itself. + +Google Meet keeps its transcripts and Gemini notes in the organizer's Drive, often outside the folders you picked for +WireCat. After you sign in to Drive, WireCat now asks whether to add them. + +## Hear your calls next to your clients + +WireCat can now install the Asterisk tool. Connect your Asterisk phone system and each call is kept as a meeting, with +its recording, and its transcript when there is one. You tell it which countries your phone lines are in, so a caller +without a country code still lands on the right contact. + +A Bitrix24 deal or lead card lists the calls of the people on it. Each call says whether it was incoming or outgoing, +who the manager was and the client's number. A call with a recording on your computer has a **Listen** button, so you +hear it right in the card. The company of a deal opens in its own card, with its people, its open deals and leads, and +how many calls its people had. + +## Search your Notion pages + +Notion is built in now. Sign in with a Notion token, and WireCat copies the pages and databases that the token can see +to your computer, so you can search them and your agent can read them. + +## Bring in your notes and documents + +The notes card now has **Connect an Obsidian vault**, and it lists the vaults Obsidian already knows, each with its +own Connect button. + +The new **Documents** page shows every document WireCat keeps, from Drive, your notes folders and your imports, in one +table you can narrow to an account or a folder. Open one to read its text and see the people and meetings it names. + +![The Documents page with a table of Google Docs, sheets, PDFs and notes, where each lives and when it changed](./documents-en.webp "Every document WireCat keeps, in one table.") + +## Install and update every tool at once + +The Tools page now sorts tools into groups by who makes them, with built-in tools first and additional WireCat tools +next. **Install all** installs every built-in tool you don't have yet, and **Update all** updates every installed tool +that has a newer version. Tools you added yourself stay out of Update all, because each of their updates goes through +its own review. + +## Smaller things + +- **See your mail rules.** An Email account's menu has **Mail rules**, with what each rule matches and what it does. +- **Install without a license prompt.** The macOS disk image and the Windows installer no longer ask you to accept + the license. The license still comes with the app. +- **Count unread notices on Ubuntu.** The dock icon shows how many notices in the bell you haven't read. + +## Get it + +If you have 0.6, the app offers the update itself. New here? Download WireCat from +[wirecat.dev/download](/en/download) for macOS, Windows or Linux. The [Desktop guide](/en/docs/desktop) covers each +page, and every version from 0.6.2 to 0.7.0 has its own +[release notes on GitHub](https://github.com/WireCatLabs/wirecat-desktop/releases). + +Meetings and Documents are marked beta, with a small β beside the name. Ideas for what to build next go on +[the ideas page](/en/ideas), and questions to [Discord](https://discord.gg/DebENqbRrJ) or +[GitHub](https://github.com/WireCatLabs/wirecat-desktop/issues). I read all of it. diff --git a/content/blog/wirecat-desktop-0-7/index.ru.md b/content/blog/wirecat-desktop-0-7/index.ru.md new file mode 100644 index 00000000..f7a77fa7 --- /dev/null +++ b/content/blog/wirecat-desktop-0-7/index.ru.md @@ -0,0 +1,85 @@ +--- +title: "WireCat Desktop 0.7: звонки и встречи рядом с перепиской и CRM" +description: Встречи, звонки и события календаря на одной странице, а звонки сделки Битрикс24 прямо в ее карточке, и запись можно послушать одним щелчком. Notion теперь встроен, хранилище Obsidian подключается одной кнопкой, а страница Инструменты ставит и обновляет все сразу. +date: 2026-11-17 +tags: [release-notes] +cover: ./cover.ru.jpg +coverAlt: "WireCat Desktop 0.7 рядом со страницей Встречи в темной теме: одна неделя, в сетке стендапы, дизайн-ревью, звонок поставщику, совет директоров и два телефонных звонка." +author: viacheslav-ptsarev +draft: false +--- + +WireCat Desktop ставит инструменты WireCat, входит в ваши аккаунты и дает вашему ИИ-агенту чаты, почту, встречи, документы и заметки. Все это хранится на вашем компьютере. В 0.7 встречи и звонки стоят рядом с перепиской и CRM: все они собраны на одной странице, а сделка в Битрикс24 показывает звонки своих людей, и запись можно послушать одним щелчком. + +## Все встречи и звонки на одной странице + +Новая страница **Встречи** показывает встречи, звонки и события календаря вместе, по неделям, по месяцам или +таблицей. Встречи в одно время стоят рядом, как в Google Календаре, а поле поиска находит встречу по словам. + +![Страница Встречи: неделя со стендапами, ревью и телефонными звонками в сетке](./meetings-ru.webp "Неделя встреч и звонков. Звонок отмечен значком телефона.") + +В карточке встречи видно, кто принял приглашение и кто отказался, ссылки для входа, итоги и расшифровку, в которой +можно найти любое слово. Там же файлы, прикрепленные к событию календаря на Drive, а одна кнопка открывает само +событие в Google Календаре. + +Google Meet хранит расшифровки и заметки Gemini на Drive организатора, часто вне папок, которые вы выбрали для +WireCat. Теперь после входа в Drive WireCat спрашивает, добавить ли их. + +## Звонки рядом с клиентами + +WireCat теперь ставит инструмент для Asterisk. Подключите свою АТС Asterisk, и каждый звонок сохранится как встреча, +с записью и с расшифровкой, если она есть. Вы указываете, в каких странах ваши линии, и звонящий без кода страны все +равно попадает к нужному контакту. + +Карточка сделки или лида в Битрикс24 показывает звонки людей из нее. У каждого звонка видно, входящий он или +исходящий, кто был менеджером и номер клиента. Если запись звонка есть на вашем компьютере, у него есть кнопка +**Слушать**, и запись играет прямо в карточке. Компания сделки открывается своей карточкой, с ее людьми, открытыми +сделками и лидами и тем, сколько звонков было у ее людей. + +Для облачной АТС Билайна есть отдельный инструмент beeline. Он забирает звонки и записи, расшифровывает их у вас на +компьютере и связывает с клиентами в Битрикс24 по номеру телефона. Он пока не встроен в WireCat, его ставят как +дополнительный инструмент WireCat. На странице Инструменты нажмите **Добавить свой инструмент** и введите +`@wirecat/beeline-cli`. С 0.7 его звонки открываются из карточки клиента и со страницы Встречи, а с 0.7.1 для него не +нужно разрешать в настройках инструменты, которые WireCat не проверял. + +## Поиск по страницам Notion + +Notion теперь встроен. Войдите по токену Notion, и WireCat скопирует на ваш компьютер страницы и базы, которые видит +этот токен, чтобы вы могли искать по ним, а агент мог их читать. + +## Заметки и документы + +В карточке заметок теперь есть **Подключить хранилище Obsidian**, и там же список хранилищ, которые уже знает +Obsidian, у каждого своя кнопка подключения. + +Новая страница **Документы** показывает все документы, которые хранит WireCat, с Drive, из папок с заметками и из +импорта, одной таблицей, которую можно сузить до аккаунта или папки. Откройте документ, чтобы прочитать текст +и увидеть людей и встречи, которые в нем упоминаются. + +![Страница Документы: таблица с документами Google, таблицами, PDF и заметками, где каждый лежит и когда менялся](./documents-ru.webp "Все документы, которые хранит WireCat, в одной таблице.") + +## Все инструменты ставятся и обновляются разом + +Страница Инструменты теперь разбивает инструменты на группы по тому, кто их делает, сначала встроенные, потом +дополнительные инструменты WireCat. **Установить все** ставит все встроенные инструменты, которых у вас еще нет, а +**Обновить все** обновляет все установленные, для которых вышла новая версия. Инструменты, которые вы добавили сами, +в это не входят, потому что каждое их обновление проходит свою проверку. + +## Мелочи + +- **Правила почты видны.** В меню почтового аккаунта есть **Правила почты**, там + видно, что ловит каждое правило и что оно делает. +- **Установщик не просит принять лицензию.** Ни образ диска для macOS, ни установщик для Windows больше об этом не + спрашивают. Лицензия по-прежнему идет вместе с приложением. +- **Значок в доке Ubuntu считает уведомления.** Он показывает, сколько уведомлений в колокольчике вы не прочитали. + +## Как получить + +Если у вас 0.6, приложение само предложит обновление. Вы здесь впервые? Скачайте WireCat на +[wirecat.dev/download](/ru/download) для macOS, Windows или Linux. [Руководство по Desktop](/ru/docs/desktop) +описывает каждую страницу, а у каждой версии с 0.6.2 до 0.7.0 есть свои +[заметки о выпуске на GitHub](https://github.com/WireCatLabs/wirecat-desktop/releases). + +Встречи и Документы отмечены как бета, маленьким знаком β рядом с названием. Идеи, что сделать дальше, оставляйте на +[странице идей](/ru/ideas), а вопросы в [Discord](https://discord.gg/DebENqbRrJ) или на +[GitHub](https://github.com/WireCatLabs/wirecat-desktop/issues). Я читаю все. diff --git a/content/blog/wirecat-desktop-0-7/meetings-en.webp b/content/blog/wirecat-desktop-0-7/meetings-en.webp new file mode 100644 index 00000000..8891e981 Binary files /dev/null and b/content/blog/wirecat-desktop-0-7/meetings-en.webp differ diff --git a/content/blog/wirecat-desktop-0-7/meetings-es.webp b/content/blog/wirecat-desktop-0-7/meetings-es.webp new file mode 100644 index 00000000..1defc357 Binary files /dev/null and b/content/blog/wirecat-desktop-0-7/meetings-es.webp differ diff --git a/content/blog/wirecat-desktop-0-7/meetings-ru.webp b/content/blog/wirecat-desktop-0-7/meetings-ru.webp new file mode 100644 index 00000000..67c13232 Binary files /dev/null and b/content/blog/wirecat-desktop-0-7/meetings-ru.webp differ diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 80354b56..531e138a 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -169,7 +169,7 @@ security), Project (changelog, roadmap). Index: the masthead (title, intro, search), topic pills with counts, then one list of posts — the newest as a lead story when there are three or more — and the series shelf; widgets on the right. Post: breadcrumb, title, intro and one meta line (author, date, reading time, languages), the series switcher, "At a glance", the -cover at text width and the text; sidebar on the right; share, author, previous/next at the end. "On this page" +cover at text width and the text, which fill the main column up to the sidebar; sidebar on the right; share, author, previous/next at the end. "On this page" folds above the text, and sits in the page margin only on screens at least 110rem wide, so it never narrows the text. Both pages use the editorial header and footer; the blog adds nothing to them.