News for hackers. Stuff that matters.

lappa

ChatGPT, request minimal necessary diff to make a specific change, review, ctrl+c, ctrl+v
Re:Visual Introduction to PyTorch on Monday February 16, 2026 @05:54PM (#47041474)
Good post. I think you mixed torch.eye with torch.full though
Re:The Monster Inside ChatGPT on Friday June 27, 2025 @12:07PM (#44397894)
This isn't suggesting no one understands how these models are architected, nor is anyone saying that SDPA / matrix multiplication isn't understood by those who create these systems.

What's being said is that the result of training and the way in which information is processed in latent space is opaque.

There are strategies to dissect a models inner workings, but this is an active field of research and incomplete.

I use the SingleFile extension to archive every page I visit.

It's easy to set up, but be warned, it takes up a lot of disk space.

    $ du -h ~/archive/webpages
    1.1T /home/andrew/archive/webpages
https://github.com/gildas-lormeau/SingleFile
Re:OpenAI O3-Mini on Friday January 31, 2025 @02:26PM (#42890847)
OpenAI clearly states that they train on your data https://help.openai.com/en/articles/5722486-how-your-data-is...
It's easy to argue that Llama-3.3 8B performs better than GPT-3.5. Compare their benchmarks, and try the two side-by-side.

Phi-4 is yet another step towards a small, open, GPT-4 level model. I think we're getting quite close.

Check the benchmarks comparing to GPT-4o on the first page of their technical report if you haven't already https://arxiv.org/pdf/2412.08905

Great project, looking forward to seeing more as this develops.

Also FYI, your mail server seems to be down.

Re:LLMs Can't Do Probability on Wednesday May 01, 2024 @05:57PM (#40230027)
Provided a constant temperature of 1.0, you can train the model on prompts with probablistic requests, with loss determined by KL divergence.

Expectation: 80% left, 20% right

Model sampling probability: 99% left, 1% right

>>> 0.80 * math.log(0.99 / 0.80) + 0.20 * math.log(0.01 / 0.20)

-0.42867188234223175

Model sampling probability: 90% left, 10% right

>>> 0.80 * math.log(0.9 / 0.80) + 0.20 * math.log(0.1 / 0.20)

-0.04440300758688229

Of course, if you change the temperature this will break any probablistic expectations from training in this manner.

Look at it from an algorithmic perspective. In computer science many algorithms take a non-constant number of steps to execute. However, there are a limited number of decoder blocks, and a limited number of FFN layers in each block. This presents a theoretical upper bound on the complexity of the algorithms a decoder network can solve in a single token generation pass.

This explains why GPT4 cannot accurately perform large number multiplication and decimal exponentiation. [0]

This example can extend to general natural language generation. While some answers can be immediately retrieved or generated by a "cache" / algorithm which exists in latent space, some tokens have better quality when their latent-space algorithm is executed in multiple steps.

[0] https://www.semanticscholar.org/reader/817e52b815560f95171d8...

Very interested in the expansion of RL for transformers, but I can't quite tell what this project is.

Could you please add links to the documentation to the readme where it states "It includes detailed documentation".

Also maybe DPO should use the DDPG acronym instead so your repos Deterministic Policy Optimization isn't confused for trl's Direct Preference Optimization.

A few days ago I saw a post using NeuralFlow to help explain the repetition problem.

https://old.reddit.com/r/LocalLLaMA/comments/1ap8mxh/what_ca...

> I’ve done some investigation into this. In a well trained model, if you plot the intermediate output for the last token in the sequence, you see the values update gradually layer to layer. In a model that produces repeating sequences I almost always see a sudden discontinuity at some specific layer. The residual connections are basically flooding the next layer with a distribution of values outside anything else in the dataset.

> The discontinuity is pretty classic overfitting. You’ve both trained a specific token to attend primarily to itself and also incentivized that token to be sampled more often. The result is that if that token is ever included at the end of the context the model is incentivized to repeat it again.

...

> Literally just plotting the output of the layer normalized between zero and one. For one token in mistral 7B it’s a 4096 dimension tensor. Because of the residual connections if you plot that graph for every layer you get a really nice visualization.

> Edit: Here's my visualization. It’s a simple idea but I've never personally seen it done before. AFAIK this is a somewhat novel way to look at transformer layer output.

> Initial output: https://imgur.com/sMwEFEw

> Over-fit output: https://imgur.com/a0obyUj

> Second edit: Code to generate the visualization: https://github.com/valine/NeuralFlow

This is nearly identical to the overfitting example in the repo, only really representing a binary, but it's a good start. Perhaps some transformations can be applied to help further?

Not a material science expert, however per their paper, they use DFT to verify the stability, then use the verification status to improve the model.

>candidate structures filtered using GNoME are evaluated using DFT calculations with standardized settings from the Materials Project. Resulting energies of relaxed structures not only verify the stability of crystal structures but are also incorporated into the iterative active-learning workflow as further training data and structures for candidate generation

Re:MistralLite by Amazon Web Services on Wednesday November 01, 2023 @01:38PM (#38101829)
Excellent, appears Amazon has introduced two important things here:

- Rope theta of 100,000, likely from the Llama 2 Long paper which found that a large theta helped regulate attention between distant tokens[0]

- A 16k (effective 32k) context window, improving upon Mistrals 4k (effective 8k) context window

In The Llama 2 Long paper, they saw improvement in short context benchmarks as well. I can't find any of the expected MMLU / HellaSwag / etc benchmarks yet, possibly due this issue[1]. Benchmarks haven't been submitted to MTEB yet.

Really surprising that this didn't gain attention on HN until just now considering it's nearly 3 weeks old!

[0] https://arxiv.org/pdf/2309.16039.pdf

[1] https://github.com/ggerganov/llama.cpp/issues/3809

Re:Consortium launched to build the largest open LLM on Wednesday October 18, 2023 @09:56PM (#37937336)
More data, more parameters, more compute all result in a better model per "Scaling Laws for Neural Language Models"

https://browse.arxiv.org/pdf/2001.08361v1.pdf

Largeness is a valid goal.

Great work, lots of useful information here.

The only thing I wish you did different was explored alpha > 2 * r.

In this blog post, the author found that alpha of 4 * r (where r=64) outperformed all smaller alphas in terms of loss when finetuning Llama-7b on databricks-dolly-15k.

https://medium.com/@drishtisharma96505/comparative-analysis-...

"For example, HyperAttention makes the inference time of ChatGLM2 50% faster on 32k context length while perplexity increases from 5.6 to 6.3."

"when half of all attention layers are patched (i.e., 14 layers), we verify that most of the tasks do not degrade more than 13%."

According to the paper, for most tasks it reduces benchmark scores substantially. Perhaps to the point where a smaller model would yield better inference time and higher benchmarks.

However, summarization benchmarks see almost no degredation, great!

Re:Decentralized Artificial Intelligence on Sunday October 01, 2023 @06:56AM (#37724708)
This seems half-baked and there are numerous faulty assumptions in this article. For example, Bitcoin miners cannot computer gradients. Their ASICs can only calculate double-sha256.

Additionally, the premise of sending gradients of models trained on private data while retaining privacy seems problematic. While you likely can't reverse it to calculate the batch's contents, it is leaky.

Further, gradient calculations are not a good proof of work. A good proof of work is difficult to calculate and easy to verify (i.e. an extremely low hash value).

The core premise, using blockchains to store terabytes of models and datasets, doesn't make any sense whatsoever.

The problems highlighted in this article however are valid, and it would be great to see something like IPFS for datasets and models.

Re:70B Llama 2 at 35tokens/second on 4090 on Wednesday September 13, 2023 @06:58AM (#37495068)
Interesting how this method quantizes different layers / modules in a manner that minimizes perplexity as it adjusts parameters.

I'd be interested to see how 2.5 bit quantization compares to an unadjusted 4-bit baseline. Additionally would be interesting to see the usual benchmarks (ARC, HellaSwag, MMLU, TruthfulQA) of this method at different average bitrates (2.0, 2.5, 3.0, 4.0, ...). Would also be interesting to see if an average bitrate of 4 is just as fast and small as a constant bitrate of 4, but more accurate.

Very exciting work, looking forward to trying this out on my models!

This is great! If I could suggest changes that would make this especially useful for me and likely others it would be

1) The ability to substitute in your own LLM, specifically I'd like to be able to use Code Llama which was released a few days ago.

2) The ability to automatically determine an appropriate plot type based on natural langugae metadata. This would allow me to bulk process labelled timeseries data. For example if I set the X label as date, it should know to make a line chart. If I present data labelled with a description involving as "percent of" or something the LLM should know to use a pie or bar chart. If I give a description involving quarterly revenue, it should know it's a time series, but with discrete values, so a bar chart with negative and positive values, etc.

Re:Llama 2 – Meta AI on Tuesday July 18, 2023 @07:17PM (#36780270)
They're based on the original technical report.

"Refuel" has run a different set of benchmarks on GPT-3.5 and GPT-4 and found a decline in quality.

https://www.refuel.ai/blog-posts/gpt-3-5-turbo-model-compari...

Re:Llama 2 – Meta AI on Tuesday July 18, 2023 @04:54PM (#36778932)
Here are some benchmarks, excellent to see that an open model is approaching (and in some areas surpassing) GPT-3.5!

AI2 Reasoning Challenge (25-shot) - a set of grade-school science questions.

- Llama 1 (llama-65b): 57.6

- LLama 2 (llama-2-70b-chat-hf): 64.6

- GPT-3.5: 85.2

- GPT-4: 96.3

HellaSwag (10-shot) - a test of commonsense inference, which is easy for humans (~95%) but challenging for SOTA models.

- Llama 1: 84.3

- LLama 2: 85.9

- GPT-3.5: 85.3

- GPT-4: 95.3

MMLU (5-shot) - a test to measure a text model’s multitask accuracy. The test covers 57 tasks including elementary mathematics, US history, computer science, law, and more.

- Llama 1: 63.4

- LLama 2: 63.9

- GPT-3.5: 70.0

- GPT-4: 86.4

TruthfulQA (0-shot) - a test to measure a model’s propensity to reproduce falsehoods commonly found online. Note: TruthfulQA in the Harness is actually a minima a 6-shots task, as it is prepended by 6 examples systematically, even when launched using 0 for the number of few-shot examples.

- Llama 1: 43.0

- LLama 2: 52.8

- GPT-3.5: 47.0

- GPT-4: 59.0

[0] https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderb... [1] https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderb...

This is a really interesting project with a lot of potential.

If I were a sponsor looking for a podcast I would want my search process to look something like this:

- Search for a term relevant to my line of business

- See a list of podcasts ordered by % of utterances which contain my key phrase throughout their last N episodes

- Annotation of how many listeners each podcast had in last N episodes

Re:The Uber Bubble on Monday April 18, 2022 @11:24AM (#31071949)
>And in small cities/towns, getting a taxi was nearly impossible a lot of the times.

My experience has been the opposite. In small towns you cannot get use rideshare apps, but you can dial a taxi service. This has been the case in every town of less than 1,000 I've needed a ride in.

Re:Tell HN: Recruiters are lying about remote positions on Thursday April 07, 2022 @11:29AM (#30945767)
Or inform the company of the recruiter who is wasting their staffs time interviewing incompatible candidates.

This doesn't seem to be the companies fault.

Older »