惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
Microsoft Azure Blog
Microsoft Azure Blog
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Hacker News - Newest:
Hacker News - Newest: "LLM"
Cyberwarzone
Cyberwarzone
Recorded Future
Recorded Future
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Threat Research - Cisco Blogs
Know Your Adversary
Know Your Adversary
Recent Announcements
Recent Announcements
L
LINUX DO - 热门话题
D
DataBreaches.Net
K
Kaspersky official blog
T
Threatpost
F
Full Disclosure
T
The Exploit Database - CXSecurity.com
C
CERT Recently Published Vulnerability Notes
S
Securelist
I
Intezer
有赞技术团队
有赞技术团队
罗磊的独立博客
爱范儿
爱范儿
S
Schneier on Security
P
Privacy & Cybersecurity Law Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
LangChain Blog
美团技术团队
G
Google Developers Blog
T
Tor Project blog
Project Zero
Project Zero
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Hacker News
The Hacker News
W
WeLiveSecurity
Engineering at Meta
Engineering at Meta
Apple Machine Learning Research
Apple Machine Learning Research
aimingoo的专栏
aimingoo的专栏
PCI Perspectives
PCI Perspectives
L
LINUX DO - 最新话题
MyScale Blog
MyScale Blog
阮一峰的网络日志
阮一峰的网络日志
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
P
Proofpoint News Feed
Webroot Blog
Webroot Blog
T
Troy Hunt's Blog

Hacker News - Newest: "LLM"

GitHub - lechmazur/position_bias: A benchmark for testing whether LLM judges keep the same preference when two lightly edited versions of the same story are shown in opposite orders. Flex routing (EU and EFTA) Dark Factories: Retooling for LLM Velocity Ask HN: What would be the impact of a LLM output injection attack? GitHub - AronDaron/dataset-generator: No-code desktop app for generating high-quality synthetic datasets to fine-tune LLMs — plan-then-execute pipeline, LLM-as-judge, HuggingFace upload. GitHub - Oaklight/llm-rosetta: Production-ready LLM API translation layer for Python — bidirectional conversion between OpenAI, Anthropic & Google formats via hub-and-spoke IR. Optional API gateway. Streaming & non-streaming. Zero core deps. Contributions welcome! GitHub - browser-use/browser-harness: Self-healing browser harness that enables LLMs to complete any task. GitHub - moeen-mahmud/remen: Remen turns thoughts into something you can return to Analyzing 156 LLM Launch Posts on Hacker News ChatGPT vs Gemini vs Claude: The Best LLM Subscription You Should Buy GitHub - salaamalykum/quran-semantic-search: High-density RAG Semantic Search Engine & Quran Corpus (GEO/SEO Architecture) GitHub - NVIDIA/TensorRT-LLM: TensorRT LLM provides users with an easy-to-use Python API to define Large Language Models (LLMs) and supports state-of-the-art optimizations to perform inference efficiently on NVIDIA GPUs. TensorRT LLM also contains components to create Python and C++ runtimes that orchestrate the inference execution in a performant way. The State of LLM Bug Bounties in 2026 Operational Readiness Criteria for Tool-Using LLM Agents Meshcore: Architecture for a Decentralized P2P LLM Inference Network How an LLM becomes more coherent as we train it GitHub - seetrex-ai/laimark GitHub - Jossifresben/BibCrit: AI-assited biblical textual criticism GitHub - wastedcode/memex: File system based wiki, maintained by Claude 99helpers.com GitHub - cliver-project/AITrigram GitHub - unbody-io/adapt: A self-evolving memory layer for AI agents. GitHub - hb20007/awesome-gen-ai-fails: A list of incidents where reliance on generative AI and LLMs resulted in harm to companies, individuals, or society GitHub - nevenkordic/localmind: Run any local LLM with persistent memory and context. CLI agent over Ollama with SQLite-backed hybrid recall. No cloud. Ask HN: What are the machine requirements for a LLM like Llama-3.1-8B? Faster LLM Inference via Sequential Monte Carlo grpo explained: group relative policy optimization for llm finetuning - cgft Stop comparing price per million tokens: the hidden LLM API costs · TensorZero Andrej Karpathy's LLM Wiki Is a Bad Idea GitHub - GG-QandV/mnemostroma: Offline RAM-first cognitive leer/coprocessor for AI agents and robotics. Solves "Context Abandonment" with 20-80ms latency using a dual-thread biomimetic memory architecture (ONNX + SQLite WAL). mempalace/agent at agent · skorotkiewicz/mempalace GitHub - Nyquest-ai/nyquest-rust-fullstack-pub: Nyquest — Semantic Compression Proxy for LLMs. 350+ rules, local LLM stage, 15-75% token savings. Full Rust stack. GitHub - TheoV823/mneme: Enforce architectural decisions in AI-assisted development. GitHub - klemenvod/TokenBrawl: A 1v1 Bomberman-style game where two LLM agents play autonomously against each other. No human plays — you watch the AIs fight. Each agent receives a text description of the board state, reasons about it, and outputs a move as JSON. The game engine executes it. Introducing the Common AI Provider: LLM and AI Agent Support for Apache Airflow Power Circuit AI: Designing Power Electronic Circuits for Motor Drives with Generative Artificial Intelligence Ask HN: How to program with IDE and LLM on CPU locally? Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Bonsai 1-bit WebGPU - a Hugging Face Space by webml-community The LLM Fallacy: Misattribution in AI-Assisted Cognitive Workflows Ask HN: Simple tooling for local LLM code critique without IDE integration? Can a General LLM Diagnose a DICOM Slice? A 10-Case Public Benchmark Charts-of-Thought: Enhancing LLM Visualization Literacy (PDF, 2026) GitHub - Mesh-LLM/mesh-llm: Distributed AI/LLM for the people. Share compute privately or publicly to power your agents and chat. GitHub - seamus-brady/springdrift: A persistent runtime for long-lived LLM agents Writing an LLM from scratch, part 32k -- Interventions: training a better model locally with gradient accumulation Ask HN: Which LLM model and agentic CLI are you using for local development? GitHub - wayneColt/modelcascade: Route local. Escalate smart. Never overspend. Open-source multi-model cascade routing for autonomous agents. LLM pricing is 100x harder than you think GitHub - asakin/llm-primer: Pre-warmed Claude Code sessions in tmux. No startup wait. GitHub - EggerMarc/chat-rs: A multi-provider LLM framework for Rust. GitHub - SynapseKit/SynapseKit: Minimal, async-first Python framework for production LLM apps- 2 hard deps, no magic, no SaaS. A Claude Skill that Makes LLM Paragraphs More Bearable Does Gas Town 'steal' usage from users' LLM credits & paid services to improve itself? What's Claude Code Actually Doing? Open the Black Box with the Arthur Engine Milla Jovovich's New Open Source LLM Memory App and the Dark Code Problem Your intuition of LLM token usage might be wrong Show HN: Bloomberg Terminal for LLM ops – free and open source GitHub - 0xchamin/mcptube: Transform YouTube videos into a compounding knowledge base with transcripts, vision analysis, and agentic search. Works as an MCP server for Claude, Copilot & more. Show HN: Open KB: Open LLM Knowledge Base Your LLM is a compiler, not a runtime GitHub - sapountzis/Unslop: A Web Feed That Deserves You crates.io: Rust Package Registry Beyond Karpathy's LLM-Wiki: The Necessity of Cognitive Governance GitHub - amitshekhariitbhu/llm-internals: Learn LLM internals step by step - from tokenization to attention to inference optimization. GitHub - parallem-ai/parallem: An expressive library for running agents with the Batch API. GitHub - stfurkan/pi-llm LLM-Wiki Show HN: Formal – Formal verification for AI-generated code using Lean 4 LRTS – Regression testing for LLM prompts (open source, local-first) LLM Wiki Skill: Build a Second Brain with Claude Code and Obsidian I built an LLM Wiki and RAG solution: here's a demo for a security KB The biggest advance in AI since the LLM Predict-Rlm: The LLM Runtime That Lets Models Write Their Own Control Flow the-synthetic-library/the-synthetic-mind at main · joshferrer1/the-synthetic-library GitHub - yisding/reviewwiggum GitHub - Donnyb369/mcp-spine: Context Minifier & State Guard — Local-first MCP middleware proxy GitHub - Beledarian/wgpu-llm: A from-scratch LLM inference engine that uses wgpu (the cross-platform WebGPU implementation) to dispatch WGSL compute shaders for every math operation a Transformer needs. No CUDA. No Python. No massive framework dependencies. Just Rust, raw shaders, and your GPU. GitHub - anitiue/Hindsight: An experience-driven self-improvement framework for LLM agents — 基于经验的 LLM Agent 自我改进框架 GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. GitHub - alainnothere/AmdPerformanceTesting: Amd Performance Testing Ask HN: Is a purely Markdown-based CRM a terrible idea? Optimized for LLM agents Context Engineering - LLM Memory and Retrieval for AI Agents | Weaviate little_helper_tui/letter.md at main · sleepyeldrazi/little_helper_tui GitHub - EvanZhouDev/umr: The Unified Model Registry for all your local AI apps. GitHub - JordanCT/VigIA-Orchestrator Your Agent Is Mine: Measuring Malicious Intermediary Attacks on the LLM Supply Chain A Taxonomy of RL Environments for LLM Agents Llama LLM Network Feture GitHub - genedeng-ca/ai-mac-migration: AI-powered Mac-to-Mac migration tool - replace Apple Migration Assistant with intelligent, selective transfer using local LLMs GitHub - lunargate-ai/gateway: High-performance self-hosted AI gateway (OpenAI-compatible) with routing, retries, and streaming GitHub - AuthBits/webmcp: A lightweight, prompt-driven MCP web research server for high-quality LLM powered information extraction. Externalization in LLM Agents: A Unified Review of Memory, Skills, Protocols and Harness Engineering Springdrift: An Auditable Persistent Runtime for LLM Agents with Case-Based Memory, Normative Safety, and Ambient Self-Perception High-Stakes Personalization: Rethinking LLM Customization for Individual Investor Decision-Making From Static Templates to Dynamic Runtime Graphs: A Survey of Workflow Optimization for LLM Agents HUOZIIME: An On-Device LLM-enhanced Input Method for Deep Personalization TIDE: Token-Informed Depth Execution for Per-Token Early Exit in LLM Inference Characterizing WebGPU Dispatch Overhead for LLM Inference Across Four GPU Vendors, Three Backends, and Three Browsers LLM Targeted Underperformance Disproportionately Impacts Vulnerable Users
GitHub - macton/differentiable-collisions-optc
thdr · 2026-06-16 · via Hacker News - Newest: "LLM"

Convex Primitive Collision Detection — reference and LLM-optimized

A sample query pair from the benchmark: two convex primitives with the reported contact points and the separation between them

This repository implements the collision query from K. Tracy, T. A. Howell, and Z. Manchester, "Differentiable Collision Detection for a Set of Convex Primitives" (arXiv:2207.00669, documents/2207.00669.pdf). For a pair of convex primitives — sphere, box, capsule, or convex polytope — it computes the minimum uniform scaling α that must be applied to both shapes for them to touch (the paper's problem (10)), and the contact points from eq. (24). α < 1 means they overlap, α > 1 means they are separated.

This is a narrow-phase solver. It assumes the caller has already run a cheap broadphase and discarded pairs whose world AABBs do not overlap, so only AABB-overlapping pairs are ever queried. The committed benchmark reflects that assumption — its 1000 pairs are all AABB-overlapping (near-contact or penetrating), so the timing measures real narrow-phase work rather than the trivial rejection of far-apart shapes.

There are two implementations here:

  • src/ — a reference C implementation that follows the paper directly.
  • src-optimized/ — an optimized single-precision implementation that produces the same collision flags and the same distances (within a stated tolerance) and runs the committed 1000-pair benchmark about 102× faster than the reference: reference median ≈ 0.276 s, optimized median ≈ 0.0027 s (median-of-5, single thread, on my machine — gcc 11, x86-64, WSL2).

That 102× crossed the 100× target I set for the committed benchmark. It also holds up off that benchmark: on alternate-seed inputs it measures 97.6–101.7× (four seeds), all passing correctness. I would not call it a uniform 100× — two of the four seeds land just under — so I claim "100× on the committed benchmark, ~98–102× generally," and no more. Numbers and caveats are in Results and limits.

Why this repository exists

Two reasons, equally important:

  1. To provide the optimized collision routines. src-optimized/ is real, tested code you can build and use, held to the reference by an independent harness.
  2. To show how an LLM was used to do the optimization — concretely and reproducibly. Every phase of this project was generated by a language model from an instruction document I wrote, and every result was checked by a harness that the model could not talk its way around. I want the method to be inspectable, not a story you have to take on faith.

The model under test here was GPT-5.5. This is one model, one run — a case study in how to drive an LLM at an optimization problem, not a benchmark comparing models.

Who did what

I find it clearest to separate the four roles explicitly.

Role What it did
Me (the human) Defined the problem and the output contract. Set the 100× target. Wrote the four instruction documents. Encoded my engineering approach as operating rules fed into every conversation. Course-corrected and decided what to keep.
GPT-5.5 (the model) Generated the reference implementation, the test harness, and the optimized solver from those documents; proposed and implemented each optimization; kept the optimization log.
The test harness The ground truth. Compared optimized output against the reference, validated it with independent code, certified the contact points, checked determinism, and timed it. Nothing here is claimed without it.
nagent (the LLM harness) The agent loop that ran the optimization — structured, file-based, and grounded each turn by the proof harness.

Where the 100× target came from: I read the reference code and made a judgment call about what I thought was achievable on this hardware. It is not a derived bound or a proof of a ceiling — it is an engineer's estimate, and I state it as one. It turned out to be roughly the right order of magnitude to push hard against.

My approach is itself written down, in context/data-oriented-design.md. Those operating rules — start from the real data, state the cost, remove work before doing it faster, handle the common case straight-line — were injected into every optimization conversation. So "what I contributed" is not just the target and the prompts; it is the method the model was made to follow.

Why the grounding matters

The structured state and the per-turn proof are not ceremony. An LLM left to optimize on its own tends to drift: it reasons from its recollection of the last result instead of a fresh measurement, it can lose a good change that was never committed, and it can report a result it did not actually run. Keeping the working state in inspectable files, committing every kept gain immediately, and injecting the real gate-and-speedup status every turn are what turn "the model says it is faster and correct" into "measured faster, gates pass, committed." That is the difference between a demo and a result.

Method — four documents, four phases

Each phase is an instruction document and the artifact it produced. The documents live in prompts/.

  1. prompts/create-reference.md → the reference (src/). A faithful C11 port of the paper: the α solve and the contact points from eq. (24), with explicit input validation. This is the correctness anchor everything else is measured against.

  2. prompts/create-optimized-test-harness.md → the harness. This specifies the test, comparison, and measurement scaffold and its constraints: a fixed, committed 1000-pair input; a reference-vs-optimized comparator; an independent validator that shares no code with either solver; a contact-point certifier; a determinism check; and a median-of-5 timing protocol. Crucially, the harness was built and proven against an identity copy of the reference before any optimization existed (see performance-test-optimized/HARNESS-BASELINE.md), so the measurement pipeline itself was trusted before it was used to judge anything.

  3. prompts/create-optimized.md → the optimized solver (src-optimized/). This is my optimization approach turned into instructions the model iterates on: profile where the cycles go, rank candidates by payoff, prefer removing work, run a simplification pass, keep the common case branch-minimal, and treat data layout and batching as first-class. The model ran this loop inside nagent (https://github.com/macton/nagent) — a data-oriented agent loop where the working state lives in plain files and the model acts only through a fixed set of structured tags. The proof harness was wired to run once per turn:

    nagent --read prompts/create-optimized.md \
           --hook-per-run ./prove-optimized-harness.sh \
           "Continue until 100x target reached."
    

    so every turn began with the real, measured gate status injected into the conversation — not the model's memory of it.

  4. prompts/create-visualizer.md → the visualizer (viz/). Described below.

What was optimized — and what was rejected

The full per-hypothesis history, with measurements and keep/revert decisions, is in src-optimized/OPTIMIZATION-LOG.md. The git history mirrors it: one commit per kept change, plus a commit recording each rejected trial. The shape of the progress matters more than any single step — it was incremental, measured, and reversible, and the dead ends were written down rather than hidden.

Kept (roughly in order):

  • Replace the reference's log-barrier Newton solve with a support/GJK + bisection computation of α — the single largest win.
  • Per-type specializations: separating-axis (SAT) paths for box-box and an asymmetric SAT for box-polytope; shifted GJK paths for sphere/capsule-polytope.
  • Move per-shape work into a build-stage precompute that is excluded from the timed solve (the runtime solves from a flat precomputed table).
  • Single precision throughout, made safe by re-centering each pair to metre scale before solving.
  • Stop building global polytope half-spaces up front; compute the few axes a pair actually needs, and precompute the polytope's unique hull edges for the box-poly SAT.
  • Compact the active-path build state; specialize and force-inline the hot support function.
  • Closed-form (analytic) contact witnesses for the radius-shape families (sphere/capsule, box-capsule, sphere/capsule-polytope), avoiding GJK for the witness where the geometry allows it.
  • Reduce bisection/refinement iteration counts where the extra steps did not change the result within tolerance.

Rejected (recorded, not hidden): a box-poly shifted-GJK path and a box-poly SAT path that either regressed or broke the tolerance/flag contract; several inlining, bracketing, and iteration-cap trials that did not measurably help; a copy-removal in the solve wrapper; and assorted witness-bookkeeping changes. Each is a one-line commit and a log entry with the reason it was dropped.

The log also records the cost of each hypothesis — wall-clock and tokens — so the price of the whole exercise is visible, not just the result.

The match contract — "faster" is not "bit-identical"

The optimized solver is not bit-for-bit identical to the reference, and it is not supposed to be. It is accepted only when:

  • the collision flags are identical — it flags exactly the same pairs as colliding as the reference; and
  • every distance agrees within |Δ| ≤ 1 mm + 0.1%·|d_ref| + 5e-4·(|c1−c2|/α²) (build/compare_results). The 1 mm floor is the documented resolution; the relative term covers large separations; the last is a conditioning term — a fixed α error scales by |c1−c2|/α², so it grows only at extreme penetration, where single precision genuinely cannot resolve the depth and the value is least actionable.

Contact points are certified for validity, not matched: a face or edge contact has many equally valid witness points, so build/validate_contacts independently checks that each emitted point lies on both surfaces and is separated by the reported distance, rather than requiring it to equal the reference's choice.

The visualizer

viz/ is a small, self-contained web tool (prompts/create-visualizer.md) that renders one query pair at a time: the two primitives, the contact points emitted by both the reference and the optimized solver, and the separation between them. It is how I eyeball that a result is geometrically sane, not just within a tolerance number. The images in this README were produced by it.

# after `make -f Makefile.optimized optimized` and a run that produced the
# two results files:
cd viz
python3 -m http.server 8000      # ES modules need an origin
# open http://localhost:8000/index.html

Sample benchmark pair Sample benchmark pair

Results and limits

Measured on my machine (gcc 11.4.0, x86-64, WSL2), committed 1000-pair input, median-of-5, single thread.

  • Speedup: ≈ 102× on the committed input (reference median ≈ 0.276 s, optimized ≈ 0.0027 s) — over the 100× target.
  • Generalization: four alternate-seed inputs measure 97.6×, 97.8×, 101.7×, 102.1×, all passing correctness. So it generalizes well, but not uniformly to 100× — I claim 100× on the committed benchmark and ~98–102× generally, not a universal 100×.
  • Gates (every kept step): full reference test suite 178/0; comparator 0 flag mismatches, 0 distances over tolerance; independent validator 0 failures; contacts 1000/1000 valid; output byte-identical run-to-run; committed input checksum unchanged.

Two honest caveats. First, these are wall-clock medians on one noisy machine; treat them as the right order of magnitude, not three significant figures. Second, some of the late gains came from reducing solver iteration counts, which spends down the accuracy margin (max distance deviation grew from ~1 mm toward ~5 mm while staying inside the conditioned tolerance), and from two selective fast-math compiler flags (-fno-signed-zeros, -fno-math-errno; the more aggressive ones were tried and rejected when they broke the gates). The most durable headroom from here is structural — batching and data layout — rather than more iteration-shaving.

Reproduce it yourself

# reference: build + test + time
make clean && make
make test                              # 178 passed, 0 failed
./run-performance-test                 # reference timing on the committed input

# optimized: build + the full end-to-end proof (build, gates, timing, seeds)
make -f Makefile.optimized optimized
./prove-optimized-harness.sh           # prints a FINAL SUMMARY + PROOF verdict
./prove-optimized-harness.sh --verbose # same, streaming every step

The proof harness verifies the committed input's sha256 is unchanged (9bd4939dc3d6c7d66459fe064768bf2d904b59410c4d8929107c9264c96dd555), so the benchmark cannot be quietly edited to flatter a result.

Domain and the library API

  • Units: metres; positions and distances are float32. Every world-AABB corner within ±8,192 m; every primitive's world-AABB extent within [0.1, 250] m; results correct to 1 mm.

  • The library allocates nothing — the caller passes a scratch buffer:

    #include "src/collide.h"
    size_t cp_collide_scratch_bytes(uint32_t prim_count);
    void   cp_collide_pairs(const cp_prim *prims, uint32_t prim_count,
                            const cp_pair *pairs, uint32_t pair_count,
                            cp_result *results, void *scratch, size_t scratch_bytes);

    Arrays in, arrays out; pairs reference primitives by index; a single query is pair_count = 1. Out-of-range coordinates/sizes, bad primitives, and non-convergence are reported per result via an explicit status — never clamped, never silently accepted.

Citation

K. Tracy, T. A. Howell, Z. Manchester. Differentiable Collision Detection for a Set of Convex Primitives. arXiv:2207.00669. (documents/2207.00669.pdf)