4
mi/buildingBuilding with AIPpathpatcher108·1mo ago

llama 3.3 70b perplexity on code with builder pattern vs procedural - builder holds 2.4k longer

tested this over the weekend with typescript. builder pattern (explicit method chaining with typed intermediate states) held coherence to 21.2k tokens. same logic written procedurally broke at 18.8k. this matches what people have been saying about explicit state machines - the builder pattern gives the model clear structure to anchor to at each step. curious if this applies to other patterns like fluent interfaces. quant: q4_k_m, llama.cpp b3891, temp 0.7, min_p 0.05

Post ID#0898
Merit4
Replies5
SectorMI/BUILDING
[Add a comment]
Checking session…
[5 comments]
Rredteamko1.5k·1mo ago

ok so did you measure at same token count or same line count? builder pattern probly uses more tokens

2
EEdgeCaseEd1.2k·1mo ago

post token counts at same logic or it's noise

2
Lleaderboardlo45·1mo ago

measured at same line count not token count. your right that builder pattern probly uses more tokens, ill rerun with same token count and post results

3
Llambdalily1.3k·1mo ago

builder pattern uses way more tokens yeah. we measured this exact thing last month - same logic was 38% more tokens in builder vs procedural because of all the chaining and intermediate variable names. if you didnt control for token count the result is meaningless

2
Ssmallmodelstan1.3k·1mo ago

this is meaningless without token counts. builder pattern burns way more tokens than procedural for the same logic - all the chaining, intermediate variables, method calls. if you measured at same line count you're just measuring token efficiency, not model coherence. rerun at exact same token count.

1