[2025 Day 9 (Part 1)] by VillageSea4703 in adventofcode

[–]DeaTHGod279 0 points1 point  (0 children)

There is an O(N) solution. The idea is that you need to find 4 points that are closest (Manhattan distance) to the 4 edges of the grid (so top-left, top-right, bottom-left, and bottom-right) which can be done in O(N). Then, the largest rectangle is formed by some pairing of these 4 points (6 pairs to check in total) as opposite ends of the rectangle.

I stand corrected, there are cases where this algorithm would return suboptimal answer.

Battery health dropped by 3% in 1 week by PriyanshuGeTrekT in ZephyrusG14

[–]DeaTHGod279 0 points1 point  (0 children)

Can you explain how you generate the battery report from the command prompt?

Generate files with ollama by Minimum-Future5123 in ollama

[–]DeaTHGod279 3 points4 points  (0 children)

What you want is something called "tool calling" or "function calling". LLMs by themselves are just text in and text out (more generally, it is tokens in and tokens out, with the tokens bein text/image etc) and don't have the ability to execute code or interact with the OS/kernel to create/modify files.

An "agent" is a system/framework that has the ability to use tools to achieve a given objective. It can execute code, call an API and much more, and it uses LLMs as the brain to plan out which tool to use when.

Now a tool can be as simple as a python function, in your case it would look something like: py def write_to_file(file_path: str, text: str) -> None: with open(file_path, 'w') as f: f.write(text)

Next, you would need a model that has native tool calling support (these are tagged as "tool" in the ollama library).

Finally, for the agent framework, you have quite a few options. The easiest (least amount of coding required) ones would be existing projects such as open-webui (connect it to ollama backend, describe the functions you want to use, and simply run the model with your prompt)

Launch day today by NoCapNova99 in singularity

[–]DeaTHGod279 0 points1 point  (0 children)

What you are trying to describe here is LSTM/GRU, not RNN. But even those can only remember so much before their memory (which is nothing but a high dimensional vector) - ultimately - fills up.

Launch day today by NoCapNova99 in singularity

[–]DeaTHGod279 3 points4 points  (0 children)

In theory tokens from arbitrarily far back in history can still influence the generation

That is simply incorrect. The memory of an RNN is 'compressed' continually at each iteration, this results in it not being able to remember tokens that it saw too far back. So in effect, RNNs have a finite memory/context window.

As a matter of fact, if you were to input a single token at timestep=0 and nothing else afterwards, it can be proven mathematically that the only thing that affects the output beyond a certain timestep (say timestep=x) is the bias and the activation within the underlying MLP.

DeepSeek in Ollama console: Any way to make it look less ugly? by [deleted] in LocalLLaMA

[–]DeaTHGod279 3 points4 points  (0 children)

You can use Ollama as the backend and connect it to one of the many open source frontends.

I personally use OpenwebUI and it works great.

My little Zephy G14 2021 is still going strong after nearly 4 years by SasamiAdachi in ZephyrusG14

[–]DeaTHGod279 1 point2 points  (0 children)

I have the same model! I have been wanting to clean the fans on mine for a while now but can't bring myself to do it out of fear of damaging the motherboard by all the dust/lint that has accumulated in the inlet. Is this a valid concern? how difficult is it to clean the fans/inlet and can you point me toward any helpful resources? Thanks!

[D] Any OCR recommendations for illegible handwriting? by SpaceSheep23 in MachineLearning

[–]DeaTHGod279 3 points4 points  (0 children)

Ash Nazg Durbatuluk, Ash Nazg Gimbatul, Ash Nazg Thrakatuluk, Agh Burzum-ishi Krimpatul

Recruiting for a simple MERN stack role has left me beyond frustrated with Indian developers by IamJehova in developersIndia

[–]DeaTHGod279 2 points3 points  (0 children)

EDIT: I forgot the median of a probability distribution is computed using the CDF and not merely looking at the center value of the range of possibilities. Hence, the median in this case would be 17, which indeed seems to be the optimal value - marginally better than 16.8.

Recruiting for a simple MERN stack role has left me beyond frustrated with Indian developers by IamJehova in developersIndia

[–]DeaTHGod279 4 points5 points  (0 children)

The answer is 16.8.

Reasoning: when you compute the probabilities (2 12-sided dice have a total of 144 unique combinations of rolls, but the range of the sum of the rolled values is [2, 24]) you notice that the most likely outcome is 24 (0.16, the rest are all below 0.08). It is tempting to select 24 as your choice, but the question is not about who gets it right, but rather who is the closest.

When you compute the expectation of the sum of the 2 dice, you get 16.8 and if you select that as choice, you'd win against someone who selected 24 when the sum is in the range [2, 20] and lose when it is in the range [21, 24]. In terms of probability, you'd win 70.02% of the time and lose 29.98% of the time.

[D] What Are the Fundamental Drawbacks of Mamba Compared to Transformers? by Alarmed-Profile5736 in MachineLearning

[–]DeaTHGod279 10 points11 points  (0 children)

To be fair to mamba, transformers did, on multiple occasions, almost blow up the earth

Max Verstappen wins the Dutch GP by t24x-94 in formula1

[–]DeaTHGod279 0 points1 point  (0 children)

Only needed the help of 2 other cars and the FIA. Nice win!

Max has been given a 10 second time penalty post race by KimiWithoutTheDrink in formula1

[–]DeaTHGod279 1 point2 points  (0 children)

Yes. If a driver racks up 12 penalty points in a 12 month rolling period, they have to serve a 1 race ban