今日已更新 59 条资讯 | 累计 30103 条内容
关于我们

标签:#m

找到 8885 篇相关文章

AI 资讯

KV Cache Quantization: I Stretched Qwen 35B's Context 8 on 12GB VRAM

600 MiB of headroom My RTX 4070 was running Qwen 35B beautifully after the --cpu-moe trick from a previous run. The tokens/sec were where I wanted them. VRAM sat at 11,714 MiB out of 12,281 — 95% full. That leaves 600 MiB. Not enough for a serious agent. The context window I was giving llama.cpp was -c 4096 . Fine for chat. Not fine when a Claude Code-style agent hands the model 12,000 tokens of tool definitions before it says hello. I wanted -c 32768 . That's an 8× jump. And the memory that grows with context length is the KV cache. Multiply the cache by 8 with 600 MiB free, and llama.cpp dies during warm-up. I know because I tried it first. What actually sits on the GPU After offloading the MoE experts to CPU (the previous chapter's trick), the GPU is holding two things: The attention weights and non-MoE parameters The KV cache — a running record of every token the model has already read The first is fixed. The second grows linearly with context length. Double the context, double the cache. -c 4096 → -c 32768 doesn't just want 8× more tokens processed, it wants 8× more cache resident in VRAM the whole time. There is no room. So the cache itself has to shrink. Two flags llama.cpp takes two flags for KV cache dtype: llama-server -m qwen35.gguf -ngl 99 --cpu-moe -c 32768 \ -ctk q8_0 -ctv q8_0 -ctk is the Key cache, -ctv is the Value cache. Default is f16 (16-bit). q8_0 cuts each in half. Halving both means the KV cache footprint drops by roughly 50%. That freed-up VRAM is exactly what I need to make the context 8× bigger without touching the model weights. The measurement Same prompt, same seed, two runs — one at f16 KV, one at q8_0 KV: KV dtype Max -c I could allocate Tokens/sec (decode) Perplexity delta f16 (default) 4096 ~34.6 baseline q8_0 32768 ~34.1 negligible in my tests The speed loss is inside noise. The context is 8× longer. The quality drop I could not tell apart from run-to-run variance. Community measurements agree: symmetric q8_0 KV lands somewhere unde

2026-07-28 原文 →
AI 资讯

🧩 One design system, native to both React and Angular

We run a React app and an Angular admin panel at work. Same company, same brand, and on paper the same design. On screen it was a different story. The React button had a 6px radius; the Angular one had 4px. The focus rings were two slightly different blues. Nobody noticed until somebody did. And every time design changed a token, someone got to hand-port it into two codebases. Twice the work, and it still drifted. So I went looking for something that treated both frameworks as equals. The React kits don't speak Angular. The Angular ones don't share a look with anything on the React side. Nothing let me define the design once and have it show up, the same, in both. So I built bpdm/ui . One rule: the look lives in tokens I gave myself one hard rule: nothing about how a component looks is allowed to live inside the React or Angular code. Colour, spacing, radius, the easing on transitions, all of it sits in @bpdm/tokens as plain CSS variables, and both framework packages just read from there. The component owns structure, behaviour, and the accessibility plumbing. The look comes from the tokens. @import "tailwindcss" ; @import "@bpdm/tokens/tokens.css" ; Change one token and both frameworks move together. There's no "now go sync the Angular theme" step, because there's only one theme to sync. Four ship in the box (two light, two dark). Override the variables and you've re-skinned all of it. The same component, twice React: import { Button , Badge } from " @bpdm/ui " ; export function Example () { return ( < Button variant = "primary" > Get started < Badge appearance = "soft" > New </ Badge > </ Button > ); } Angular: import { Component } from " @angular/core " ; import { BpdmButton } from " @bpdm/ng " ; @ Component ({ selector : " app-root " , imports : [ BpdmButton ], template : `<button bpdmButton>Get started</button>` , }) export class App {} Same padding, same radius, same focus ring. The accessibility isn't literally shared code: Radix does that work on the React s

2026-07-28 原文 →
AI 资讯

I've built a handful of MCP servers. Here's what separates a good one from a demo.

This year I've built more MCP servers than I meant to, across three pretty different shapes: vellum : a self-hosted server over a folder of markdown, so my agent has a memory that's just files I own. (Open source, MIT.) Metrifyr : a marketing-data server that puts GA4, Search Console, AdSense and Tag Manager behind one connection. A read-only gateway over a company's internal user-data stack, federating half a dozen internal services behind one audited MCP surface. Personal, product, enterprise. Totally different data, totally different stakes. And yet the things that made each one good , versus a flashy demo that falls over the moment a real agent uses it in anger, were the same every time. Here are the seven that keep recurring. 1. Every tool you expose is a tax on the agent's context This is the one nobody warns you about. Every tool definition (name, description, JSON schema) gets loaded into the model's context on every single request , whether or not it's ever called. Twenty tools of boilerplate and the agent is reading pages of plumbing before it touches your data. So the design pressure runs the opposite way from a normal API: fewer, broader tools beat many narrow ones. vellum has 15 core tools and I fought to keep it there. If a tool doesn't earn its slot in the context window on most requests, it shouldn't be a tool. 2. Tools are for acting. Resources are for reading. The corollary to #1. Most servers expose everything (including "read this thing") as a tool. But MCP has a better primitive for reading: resources . In vellum, every note is a resource at a stable URI ( vellum://note/projects/x.md ). The agent attaches a document by reference instead of spending a tool round-trip to fetch it, and it can subscribe to that URI and get told the moment the note changes. Reading through a resource costs no tool definition. Reading through a tool costs one on every request. Use the right primitive. 3. Fail closed on auth, fail open on limits A token with no grants

2026-07-28 原文 →
AI 资讯

BrowserAct in 2026: The Best No-Code Web Scraping Tool That Replaced My Python Scrapers

If you've been following this series, you know I've been testing BrowserAct for months now. Article 1 covered the CLI setup. Article 2 covered headless + human handoff. Article 3 was a 6-week production review. Those were all about the CLI, the developer tool. This article is different. BrowserAct now has a cloud product called BrowserAct Agent Built where you describe what data you need, and it builds a reusable scraper for you. No terminal. No code. Just a prompt. I tested it on five real business workflows. Here's what I found. Every quarter I update a pricing comparison spreadsheet for my clients. I work with teams evaluating deployment platforms, and the question is always the same: "Which one should we use for this project?" The honest answer depends on workload, team size, and budget. So I maintain a comparison across Vercel, Netlify, Railway, Render, Fly.io, and DigitalOcean. Six platforms. Six tabs. Two hours of squinting at marketing copy and copying numbers into a sheet. I wrote Python scrapers to automate it. BeautifulSoup, Playwright, the works. They lasted three months. Then Vercel redesigned their pricing page. Selectors broke. Fixed them. Netlify changed theirs two weeks later. Fixed again. Fourth breakage in six months, I stopped maintaining the scripts entirely. Back to manual. Two hours, every quarter. For a spreadsheet. But here's the thing: across my client engagements, I keep seeing the same problem in different shapes. The e-commerce team tracking competitor prices on Amazon every Monday. The agency paying for lead lists that are already stale. The HR team spending days copy-pasting salary data from job boards. Everyone needs web data. Almost nobody wants to maintain the code that collects it. Yesterday I tested BrowserAct Agent Built on five business workflows I actually deal with across different client engagements. One prompt each. No code. No selectors. Results below. Table of Contents What BrowserAct Agent Built Is (Quick Context) Test 1:

2026-07-28 原文 →
AI 资讯

Cómo montar un motor de contenidos que no te arruine (julio 2026)

Cómo montar un motor de contenidos que no te arruine (julio 2026) Si sigues pagando 300 euros al mes por herramientas "todo en uno" de marketing, estás tirando el dinero. A mediados de 2026, la tecnología para automatizar ha bajado tanto de precio que los costes de infraestructura de contenidos son casi ridículos. La clave no es la herramienta cara, es conectar piezas pequeñas con APIs baratas. Aquí tienes cómo tengo montado mi flujo de trabajo ahora mismo. La pila tecnológica (el stack) Para automatizar sin gastar, olvida las plataformas de marketing tipo HubSpot o plataformas cerradas. Mi setup actual es este: Cerebro: Claude 3.5 Sonnet (vía API). Es mejor razonando que GPT-4o para tono editorial. Orquestador: n8n (corriendo en una VPS de 5 euros al mes en Hetzner). Base de datos: Notion (vía API para gestionar el calendario). Distribución: Ghost para el blog y la API de LinkedIn/X para el alcance. Coste total: Menos de 15 euros al mes. Paso 1: El disparador (el calendario en Notion) No uses un Excel. Usa una base de datos de Notion con cuatro columnas: Estado , Título , Prompt_Contexto y Fecha_Publicación . Cuando cambias el estado de "Borrador" a "Listo para generar", el webhook de n8n se dispara. Aquí es donde empieza el ahorro. No envías toda la base de datos, envías solo el registro nuevo. Paso 2: El prompt como código, no como texto La mayoría de la gente comete el error de pedirle a la IA: "escribe un post sobre X". Sale basura genérica. En 2026, si no das contexto, el contenido no posiciona ni recibe interacción. En tu nodo de n8n, construye el prompt de forma dinámica. Así es como envío la estructura a la API: { "model" : "claude-3-5-sonnet-20260620" , "system" : "Eres un redactor técnico senior especializado en SaaS B2B. Tu estilo es directo, sin paja, sin adjetivos innecesarios. Evitas los clichés de marketing de 2024. Tu objetivo es educar, no vender." , "messages" : [ { "role" : "user" , "content" : "Escribe un artículo corto basado en este punto clav

2026-07-28 原文 →
AI 资讯

Docusaurus i18n: How to keep translations in sync (manual vs Crowdin vs GitHub Action)

If you maintain a Docusaurus site in more than one language, you already know the actual problem isn't translation — it's staying in sync . Someone updates three paragraphs in the English docs, and six months later the Chinese (or Spanish, or whatever) version is quietly wrong, and nobody notices until a user files an issue about it. I went looking at how teams actually solve this, and it mostly comes down to three approaches. Writing this down mostly for my own reference, but sharing in case it saves someone else the research. Approach 1: Just do it manually This is what most small-to-mid docs sites do, at least at first. A maintainer (or a translator on Slack) watches for doc PRs and manually updates the other language folders. It works fine until it doesn't. The failure mode is always the same: it's invisible. Nobody gets paged when a translated page goes stale — it just sits there, slightly wrong, until a reader notices the code sample doesn't match anymore. For a project with a handful of docs and one contributor doing translations, this is honestly fine. Past ~50-100 pages or more than one language, it stops scaling — not because the translation work is hard, but because tracking what changed becomes a full-time job nobody signed up for. Approach 2: A translation management platform (Crowdin, Lokalise, etc.) These are built for exactly this problem and they're genuinely good at it — string extraction, translator workflows, in-context editing, the works. If you have a dedicated localization team or professional translators involved, this is probably still the right call. The tradeoff for a docs-only, engineering-driven project: they're built around the assumption that there's a human translator (or a review pipeline) doing the actual translating, plus a separate sync step to pull translations back into your repo. That's the right tool when translation quality and nuance matter enormously (marketing copy, legal text) or when you have translators who aren't devel

2026-07-28 原文 →
开发者

My MCP Server Holds Two API Keys. Every Tool Call Runs in the Same Process as Both.

I read a post this week where someone connected three MCP servers to one agent and watched it casually request the same access it'd need to hit production. The comment thread was full of "yeah, that's the whole problem with MCP" takes, and I almost scrolled past it — I don't run three servers, I run one. Then I actually opened server.py to check, and realized my one server has the exact same shape of problem, just folded into a single file instead of spread across three. server.py is a FastMCP server with 8 tools split across two unrelated jobs: GitHub profile/repo reads, and DEV.to article reads and writes. Both credentials get loaded the same way, at import time, into the same process environment: def load_env ( path = " .env " ): try : with open ( path ) as f : for line in f : line = line . strip () if line and not line . startswith ( " # " ) and " = " in line : k , v = line . split ( " = " , 1 ) os . environ . setdefault ( k , v ) except FileNotFoundError : pass load_env () and two helper functions read them back out: def _gh ( path , method = " GET " , data = None ): req = urllib . request . Request ( f " https://api.github.com { path } " , method = method ) req . add_header ( " Authorization " , f " token { os . environ [ ' GITHUB_TOKEN ' ] } " ) ... def _dev ( path , method = " GET " , data = None ): req = urllib . request . Request ( f " https://dev.to/api { path } " , method = method ) req . add_header ( " api-key " , os . environ [ " DEV_TO_API " ]) ... Nothing here is a bug in the sense of "wrong output for some input." Every tool does exactly what it says: get_github_profile reads GitHub, create_article writes to DEV.to. The problem is one level up, in what the process boundary actually protects. I'd been thinking of GITHUB_TOKEN and DEV_TO_API as belonging to different tools , scoped by which function reads them. They don't. They belong to the process . Every one of those 8 tools runs with both credentials sitting in its environment, whether the tool ne

2026-07-28 原文 →
AI 资讯

Perplexity’s Personal Computer turns Windows PCs into AI agents

Perplexity has expanded its agentic Personal Computer tool to Windows, allowing computers running the world's most popular OS to be used as a locally run AI system. Like the Mac version that Perplexity launched in April, Personal Computer for Windows operates like a "general-purpose digital worker" that can access local files and apps to perform […]

2026-07-28 原文 →
AI 资讯

Vendor-agnostic ML inference on production edge devices

I work on PostSlate, a video editing tool, and this comes out of our own work. We run ML models on-device, face detection and embedding among other things, which means we can't assume anything about the user's GPU. NVIDIA discrete, AMD, Intel integrated, Apple Silicon, all of it. That rules out CUDA immediately, we needed one backend that runs everywhere. We landed on ncnn's Vulkan backend. Numbers on a 4070, fp16: ArcFace R50 (face embedding): 30 ms on ONNX CPU → 3 ms on ncnn Vulkan SCRFD (face detection): 25 ms → 2.5 ms Model size: ArcFace 174 MB (ONNX fp32) → 87 MB (ncnn fp16 weight storage) Of course the real speedup comes from offloading compute to the GPU, but this wouldn't be possible without the power of Vulkan. The speed wasn't even the deciding factor, it's that Vulkan drivers already exist on every machine we ship to. This means that we don't have to force the user to download a specific runtime and no vendor-specific installs. Full writeup with the rest of the numbers: https://getpostslate.com/blog/faster-local-inference submitted by /u/ppchaos [link] [留言]

2026-07-28 原文 →
AI 资讯

How to Prevent Duplicate Message Processing with Inbox Pattern

Duplicate message processing is something every event-driven system eventually faces. With at-least-once delivery, retries and redeliveries are expected. The challenge is making sure processing the same message twice does not create side effects. I've been looking into the Inbox Pattern as a consumer-side solution: track processed messages keep message tracking and business changes in the same transaction scope the idempotency check per consumer One approach is using a MassTransit pipeline filter so the idempotency logic stays outside the consumers. How do you usually handle this? Do you use Inbox Pattern, custom middleware, database constraints, or something else? submitted by /u/DotDeveloper [link] [留言]

2026-07-28 原文 →
AI 资讯

Presentation: The Future of Engineering: Mindsets That Matter When Code Isn’t Enough

Ben Greene discusses how software engineers can adapt and thrive in an era of rapid AI code automation. Drawing on his startup experience, he explains key mindsets like starting simple, maintaining code comprehension, attacking hard problems first, and focusing on customer impact. He shares why human empathy, agency, and practical problem-solving remain irreplaceable when code is automated. By Ben Greene

2026-07-28 原文 →