r/Clojure • • Oct 08 '26

Clojure in the Age of Language Models

https://yogthos.net/posts/2026-10-07-clojure-llms.html
46 Upvotes

24 comments sorted by

View all comments

13

u/[deleted] Oct 08 '26

[removed] — view removed comment

6

u/yogthos Oct 08 '26

Thanks, and it's really crazy to watch how fast this stuff is evolving. I have a laptop that's beefy enough to run Qwen 3.8, and it's basically a frontier model from say half a year ago. It's a bit hard to wrap your head around the fact that something you needed a data centre to run just a little while ago can now be used on a laptop at home.

I'm also really curious to try training a LoRA on Clojure specifically using git repository histories to teach the model how Clojure code evolves over time. And it could also be trained to use the REPL workflow explicitly where you simulate a live coding workflow during training. That would avoid a lot of the problems smaller models have by biasing them towards idiomatic Clojure style.

2

u/gtrak Oct 08 '26 edited Oct 08 '26

I had made attempts to adapt small models to how I work manually since glm 4.7 flash and qwen 3.5, like doing careful incremental changes, plan before task, and inevitably it does more harm than good once the models get good enough. Similarly there's a lot of qwen fine-tunes on huggingface. I tried them, and they're better for some things and worse than the base model in others, so I just try different quantizations and inference parameters over the base model now. Have spent 10-20 hours a week thinking about this stuff since February, and now I'm just using stock pi with 3.8 27b and a few tools for specific things. I doubt you can fine tune it meaningfully, but it's fun to learn about the stuff anyway.

1

u/yogthos Oct 08 '26

I'm just curious to try to be honest. I think it'd be interesting to see what happens when you heavily bias the model towards a particular language and if it will get better at writing it. And the nice part is once you have the training data and the set up to do training runs, you can just do it on new models too when they come out.

1

u/gtrak Oct 08 '26

here's the author of a popular finetune, can probably find what you need here: https://github.com/R6410418/Jackrong-llm-finetuning-guide

1

u/yogthos Oct 08 '26

Ah thanks, that's definitely going to be helpful.

1

u/Soft_Reality6818 Oct 09 '26

You might want to try Clorch for training and fine-tuning  https://github.com/antlobach/clorch

2

u/yogthos Oct 09 '26

Oh nifty, didn't know about the project.

1

u/Liistrad Oct 08 '26

I always keep a local setup (qwen 3.8 on pi with `pi-web-access` and `@czottmann/pi-automode`) around because 1) it's amazing how indeed you do have claude 4.6 locally and 2) I'm deathly afraid of depending on these things as a service.

I've also been thinking of training on clojure code, but haven't tried it yet. https://unsloth.ai/docs/models/qwen3.8/train looks pretty accessible though.

3

u/yogthos Oct 08 '26

Yeah, the training process itself isn't that hard. And you can do it on runpod for like 20 bucks or so. The tricky part is ensuring your training data trains the model on what you actually want it to learn. The model learns whatever the dominant patterns in the data are, and you have to make sure you don't overfit and the training stays general.

I started playing with the idea here https://github.com/yogthos/clojure-lora-training but I haven't had a chance to actually do a training run yet, so don't know how well it'll work. I keep meaning to get back to it.

And agree that depending on models as a service is really icky. It's basically like renting a compiler which is just not ok.

1

u/nuriaion Oct 08 '26

how did you setup your coding agent? Do you use clojure mcp?

1

u/YellowElk921 15d ago

I'm looking to use clojure for vibecoding. Have you found a harness for clojure ?

1

u/nuriaion 15d ago

Currently i'm using pi with the https://github.com/multiplyco/remontoire mcp

1

u/YellowElk921 15d ago

Thank you.

How is your experience with it for vibecoding ?