u/ReverseBlade

▲ 27 r/fsharp

SIMD-friendly push streams in F#

https://preview.redd.it/t3h71biqoz9h1.png?width=1358&format=png&auto=webp&s=6ecc0700ee449a37186c9fe44adee79efbefafef

I’ve been playing with SIMD-friendly push streams in F#.
Normal push streams are great for composition: the source pushes elements through map, fold, etc., and with enough inlining the overhead mostly disappears.

But they still push one element at a time, which is not ideal for SIMD.
So I tried pushing Vector<'T> blocks instead, with a scalar path for the tail.

The pipeline stays generic and composable, but in my benchmark it runs around handwritten SIMD speed.

Small thing, but it made me happy: write the abstraction clearly, then make it vanish.

reddit.com
u/ReverseBlade — 8 days ago
▲ 24 r/fsharp

I built a small Qwen voice agent orchestrated in F# / Fable

I built a rough browser-based voice agent where most of the orchestration is in F#.

You can talk to it, interrupt it while it is speaking, and ask it to edit live page state through tool calls. For example, the shared notes box on the page can be read and updated by the agent.

The interesting F# part is that the same codebase targets:

  • the browser side via Fable
  • the Python side via Fable.Python
  • shared protocol/types between the two, so the frontend and backend do not drift apart

There are two demo backends:

  • CPU edition, slower but cheaper
  • GPU edition, A100-backed and faster, but temporary because renting an A100 is not exactly free :)

Source is closed for now because this is part of a larger experiment, but I wanted to share it here since F# felt like a really nice fit for this kind of AI orchestration: async flows, state transitions, tool calls, and typed protocol boundaries.

Also, credit to Dag Brattli for the Fable.Python work. That made this experiment much more practical.

Demo: https://novian.works/voice_gpu

Please keep sessions short if you try the GPU version. I will probably only keep it online for a few days.

reddit.com
u/ReverseBlade — 15 days ago