u/AnnoyingMemer

How do you get a local model to properly run as an agent?

Hello all, newbie to opencode and locally hosting llms in general, I figured I'd give it a shot so I can have an agent working on more menial background tasks while I work on high priority things. I've tried llama 3.1 and qwen 2.5 coder 7b with a context window of 16k. Whenever I use one of the free models opencode comes with, they function just fine and just go ahead and do what I tell them to. However, any exchange with either of the two local models goes like this:

  • Me: Read (file), (file) and (file) and look for (something). Then implement a fix.
  • Model: To answer your question, we can read a file using the read tool: (some raw JSON with the tool parameters) and the write tool (more raw JSON with tool parameters).
  • Me: Go ahead and execute the tools you listed.
  • Model: We can use the read tool: (again raw JSON)

It's honestly getting pretty tiring. I know my hardware is capable of running the model, but I can't seem to get it to act as a proper agent. Any solutions?

reddit.com
u/AnnoyingMemer — 23 hours ago

How do you get a local model to properly run as an agent?

Hello all, newbie to opencode and locally hosting llms in general, I figured I'd give it a shot so I can have an agent working on more menial background tasks while I work on high priority things. I've tried llama 3.1 and qwen 2.5 coder 7b with a context window of 16k. Whenever I use one of the free models opencode comes with, they function just fine and just go ahead and do what I tell them to. However, any exchange with either of the two local models goes like this:

  • Me: Read (file), (file) and (file) and look for (something). Then implement a fix.
  • Model: To answer your question, we can read a file using the read tool: (some raw JSON with the tool parameters) and the write tool (more raw JSON with tool parameters).
  • Me: Go ahead and execute the tools you listed.
  • Model: We can use the read tool: (again raw JSON)

It's honestly getting pretty tiring. I know my hardware is capable of running the model, but I can't seem to get it to act as a proper agent. Any solutions?

reddit.com
u/AnnoyingMemer — 1 day ago
▲ 10 r/emulators+1 crossposts

Software-driven 3D rendering, done entirely on a 16-bit cpu

Hello all! For a while I've been working on my fantasy console, which I've posted about here before. Today I released v0.4 with tons of bugfixes on the emulator itself, but that's not what I'd like to bore you with today. See the spinning cube? That cube is actually a fully software-driven wireframe renderer running on the CPU, even in spite of the lack of floating point support.

What surprised me when making this is how intuitively concepts like fixed point math and Brasenham's algorithm play with retro hardware. With some effort, I was able to get the CPU's cycle count to play nice and render the cube with no stuttering. Are there any systems of the 16-bit era that tried to do purely software rendering on the main CPU (except for the SNES with the Super FX) beyond simple wireframes?

Admittedly, this is more cool than it is useful for developing games for the console, but I just thought I'd share it because it seems amazing to me that such a restricted system can do so much when programmed correctly. Not to mention I never thought I'd come to like high school math like vectors. For anyone curious, the source for the renderer is here.

u/AnnoyingMemer — 1 day ago
▲ 23 r/fsharp

I've recently started learning F# and the entire paradigm of functional programming. I'm doing this because I want to research the applications of both the language and the approach it requires in gamedev, particularly in systems like finite state machines and ECS. Are there any, and could you point me to any good sources?

reddit.com
u/AnnoyingMemer — 17 days ago
▲ 64 r/fsharp+3 crossposts

I have spent some time recently reimplementing Mojang's DataFixerUpper library (which handles serialization and data transformation through the lifetime of a project) in C# with a few of my own takes on it. It uses literally zero reflection and rivals the built-in System.Text.Json library in allocations, sometimes even beating it (although latency is a bit of a problem right now because I'm not batching operations together), as evidenced by the benchmarks:

| Method                     | Mean     | Error    | StdDev    | Median   | Gen0   | Allocated |
|----------------------------|---------:|---------:|----------:|---------:|-------:|----------:|
| STJ_Serialize              | 237.9 ns | 24.37 ns |  71.86 ns | 194.4 ns | 0.0343 |      72 B |
| STJ_Serialize_IntArray     | 186.2 ns | 20.36 ns |  60.02 ns | 142.0 ns | 0.0191 |      40 B |
| STJ_Deserialize            | 321.7 ns |  5.65 ns |  10.19 ns | 318.4 ns | 0.0801 |     168 B |
| STJ_Deserialize_IntArray   | 198.2 ns |  2.63 ns |   2.46 ns | 197.5 ns | 0.0534 |     112 B |
| Codec_Serialize            | 546.0 ns | 59.11 ns | 174.29 ns | 418.2 ns | 0.0534 |     112 B |
| Codec_Serialize_IntArray   | 393.4 ns |  2.92 ns |   2.28 ns | 392.7 ns | 0.0610 |     128 B |
| Codec_Deserialize          | 524.7 ns |  5.14 ns |   4.29 ns | 524.2 ns | 0.0305 |      64 B |
| Codec_Deserialize_IntArray | 475.7 ns |  4.07 ns |   3.40 ns | 475.0 ns | 0.0343 |      72 B |

The library is designed in such a way that you can create tiny codecs for structs/classes and compose them together to serialize even complex/nested DTOs seamlessly. You can also define "timelines" for your objects and pass their serialized versions through transformation pipelines to add/remove/rename keys.

The library also happens to be format-agnostic by design, so the exact same APIs would work with a backend for cbor, custom binary, yaml, burping into the mic vocoded into gangsta's paradise or any other format you might think of.

u/AnnoyingMemer — 6 days ago