HNHacker News
TopNewBestAskShowJobs

xml

48 karma · joined December 9, 2020

submissionscomments
xml··on A Field Guide to Reward Hacking in AI Kernel Generation
I'd like to add a few failure modes:

- LLM removes/disables/weakens tests (disallowing manipulation of tests is not really possible in Python since the language is too dynamic, so the entire execution has to be sandboxed, which makes timing more difficult)

- LLM mutates input, which might throw off some tests (for example, sorting an array where all values have been set to zero is easy), but this can easily be solved by copying the input to somewhere safe or regenerating it from a fixed random seed.

- LLM writes code that only passes the test cases and nothing else, often with a new special case inserted after every failed test. Randomizing everything seems to be a good defense, although it is not always easy to know beforehand what to randomize. Tensor shapes are obvious, but randomizing data distribution to prevent circumvention via precision downgrades is difficult.

And regarding "10. Baseline Kernel" from the article; I've had LLMs call __import__ or compile and obfuscate the code in order to circumvent tests. The proposed defense of static analysis is not quite sufficient here.

I can relate to all points mentioned in the article. They really do happen in practice, and many are also applicable to test-driven development with LLMs. Is there any benchmark to evaluate whether an agent solves a task "in the spirit of the prompt" instead of simply solving it to pass tests?

xml··on How will OpenAI compete?
> But on a tangent, why do you believe in mixture of experts?

The fact that all big SoTA models use MoE is certainly a strong reason. They are more difficult to train, but the efficiency gains seem to be worth it.

> Every thing I know about them makes me believe they're a dead-end architecturally.

Something better will come around eventually, but I do not think that we need much change in architecture to achieve consumer-grade AI. Someone just has to come up with the right loss function for training, then one of the major research labs has to train a large model with it and we are set.

I just checked Google Scholar for a paper with a title like "Temporally Persistent Mixture of Experts" and could not find it yet, but the idea seems straightforward, so it will probably show up soon.

xml··on How will OpenAI compete?
Even with inflated RAM prices, you can buy a Strix Halo Mini PC with 128GB unified memory right now for less than 2k. It will run gpt-oss-120b (59 GB) at an acceptable 45+ tokens per second: https://github.com/lhl/strix-halo-testing?tab=readme-ov-file...

I also believe that it should eventually be possible to train a model with somewhat persistent mixture of experts, so you only have to load different experts every few tokens. This will enable streaming experts from NVMe SSDs, so you can run state of the art models at interactive speeds with very little VRAM as long as they fit on your disk.

xml··on The new Design for Stack Overflow is now live [beta]
Looks like the pop-ups that cover 70 % of my netbook's screen are still there: https://i.imgur.com/uPbVW2o.png

I wonder if getting rid of those pop-ups would have slowed Stack Overflow's decline. The number of new posts has dropped by 98 % (198540 posts in 2020 down to 3097 in January: https://data.stackexchange.com/stackoverflow/query/1926661#g...)

xml··on The Missing Semester of Your CS Education – Revised for 2026
To put it into your metaphor: I am not advocating against the existence of bandsaws. I would just rather have bandsaws that do not cut off your fingers if you do not read a book about them first and make it difficult to sew the fingers back on, while requiring arcane incantations to do their work.

There are of course power tools with obnoxious protections that make them difficult to use, but since we are dealing with software here, we are not bound by the laws of physics. I believe that we can create a better tool that is both powerful and easy to use.

xml··on The Missing Semester of Your CS Education – Revised for 2026
If most people are not using a tool properly, it is not their fault; it is the tool's fault.

Git is better than what came before, and it might be the best at what it does, but that does not mean that it is good.

- The interface is unintuitive.

- Jargon is everywhere.

- Feature discoverability is bad.

- Once something goes wrong, it is often more difficult to recover. If you're not familiar enough with Git to get yourself into that situation, then you certainly aren't familiar enough to get yourself out of it.

Many of those issues are due to git being a command line interface, but others (like no general undo and funny names) are simply due to bad design.

I think it is about time that we try again and build a better version control tool, but maybe git is just too entrenched.

xml··on Show HN: enveil – hide your .env secrets from prAIng eyes

    > this code is not copyright protected, therefore you are not allowed to apply a MIT LICENSE to this project.
Why not? You still can (and probably should) disclaim warranty and whether the code is copyright protected may vary by jurisdiction.

(Not sure if claiming copyright without having it has any legal consequences though.)

xml··on RWKV-7 beats Llama 3.2 with 3x fewer training tokens and formally exceeds TC^0

    > Specifically, we collected new data created after January 2025, including: [...] new fiction on Archive of Our Own (Various, 2025),
Not sure how to feel about this. From a researcher's point of view, reproducibility is important, but the last time someone publicly collected data from AO3, the community was not very fond of that.

https://huggingface.co/datasets/nyuuzyou/archiveofourown/dis...

xml··on Rolling your own serverless OCR in 40 lines of code
You can still be excited! Recently, GLM-OCR was released, which is a relatively small OCR model (2.5 GB unquantized) that can run on CPU with good quality. I've been using it to digitize various hand-written notes and all my shopping receipts this week.

https://github.com/zai-org/GLM-OCR

(Shameless plug: I also maintain a simplified version of GLM-OCR without dependency on the transformers library, which makes it much easier to install: https://github.com/99991/Simple-GLM-OCR/)

xml··on Show HN: Jsonic – Python JSON serialization that works
Were there any particular challenges when implementing your library? I have implemented my own serialization library [1] (with a focus on not allowing arbitrary code execution), but had skipped dataclasses for now, since they seemed difficult to get right. What was your experience?

[1] https://github.com/99991/safeserialize

Side note: I think that a warning in the README about arbitrary code execution for deserialization of untrusted inputs would be nice.

xml··on SVGs that feel like GIFs
A word of caution: There are SVGs which can freeze a page, so make sure that you do not link to any third party SVGs. This is a known bug, but both the Google Chrome and Mozilla team do not want to fix it.

Here is an evil example SVG for demonstration.

DON'T CLICK THIS LINK UNLESS YOU WANT TO RISK CRASHING YOUR BROWSER!

https://asdf10.com/danger.svg

xml··on TinyLlama: An Open-Source Small Language Model
Here is another inference implementation in Python (only dependency is PyTorch).

https://github.com/99991/SimpleTinyLlama

The new checkpoints did not seem much better and they changed the chat format for some reason, so I did not port the new checkpoints yet. Perhaps I'll get to it this weekend.

xml··on MetaCLIP – Meta AI Research
I found CLIP to be _amazing_ for all kinds of image search, like search-by-text or search-by-image. I even ported it to NumPy to understand it better. The whole thing is less than 500 lines of Python (including blank lines and comments): https://github.com/99991/NumPyCLIP
xml··on Ask HN: Teach me something new
If you ever use the middle mouse button to open links in a new tab, you should disable this "feature" because it is a security vulnerability which allows for grabbing the clipboard content.

Demo: https://randomforest.net/captureClipboard.html

xml··on Show HN: Bulk convert images online without sending to server
Can't you just unplug the Ethernet cable/turn off the Wi-Fi module? (At least if the website was not lazy-loading resources.)
xml··on Show HN: Bulk convert images online without sending to server
I also implemented a batched client-side web tool to resize photos to a certain file size (in a few hundred lines of JS). It only supports JPEG, but it resizes photos almost instantly https://randomforest.net/resizePhoto.html

Here are a few ideas to make yours faster:

1. Use the browser's canvas element to compress JPEG or PNG images instead of WASM. The libraries which come with browsers can use processor-specific instructions, while WASM only targets the smallest common denominator of the most common architectures, so it will be slower.

2. Which resizing method are you using to find a fitting image size? For me, it worked well enough to downscale by some factor a few times until it fits, but if you want to get super close, you could use binary search.

xml··on CSS in GitHub Readmes
There are SVGs which will crash most browsers, so SVGs could still be abused for denial-of-service attacks.

For example, you could post one of those SVGs in every issue thread of a GitHub project if you wanted to mess with someone.

Not eligible for a bug bounty though since this issue has been known (but not fixed) for years.