Repository navigation
Conversation
909de16 to
ed418ae
Compare
|
I ran one interview by hand with everything local: Setup:
What this PR covers:
Found on the interviewer side, outside this PR:
This is one run on one problem. I will run a few more, including a whiteboard interview, before calling the local report path done. |
|
The first run found a bug in this PR, now fixed in 4d63990, and a second run with the same setup confirms the fix. The bug. The phase judge requests Second run, same problem and setup, about seven minutes:
The report this time described the bug correctly (inserting before checking, so 3 matched itself), scored all six REACTO phases, marked the behavioral round as skipped, and did not name the LeetCode title. What the judge still gets wrong with gemma. The format is fixed; some of its judgments are not good:
These are judgment errors by a 12B model, not transport problems, so I have not tried to fix them in the shim. If the check should also hold the quote to the phase it claims, that would belong in |
|
A correction to my first comment, where I wrote "Nothing in the session reached Google". That was not quite true.
Every model call was local in both runs: the report, the phase judge and the pause review went to gemma through the shim, and the live interviewer used local whisper, gemma and Kokoro. Neither CodeTrial's log nor either shim's log shows a request to |
|
I opened #257 to collect results from other models and GPUs. It gives step-by-step instructions and a script that runs the report test three times plus the behaviour check against this branch, along with a results template. My two runs on the 5070 Ti are in it as the reference. The results should show whether the fixed local deadlines (45 s per report call, 12 s per side call) hold on slower hardware, and which models follow the hint and disclosure rules. |
jserv
left a comment
There was a problem hiding this comment.
Rebase the current branch onto the upstream default branch and rework the series into functionally minimal commits, folding similar ones and enforcing the project's commit message rules.
0777cf7 to
e81cb5a
Compare
|
Rebased onto 00b5a52 and folded into three commits: the self-hosted report path, repair prompts that say what to change, and the behaviour check through the shim. The tree is unchanged from the six-commit series. |
The report and interim-review calls always went to Google, so trying a model on one's own GPU meant editing the URL by hand. They now go to CODETRIAL_GEMINI_REST_BASE when it is set, read from the process environment like INTERVIEW_ROOM_NAME; unset, nothing changes, and the live socket is untouched either way. scripts/gemini-shim.py answers generateContent from llama-server, carrying schemas, JSON mode and function calls across and passing status codes through, so the retry rules still see a 503 as a 503. A 9B to 14B model on one consumer GPU takes 14 to 32 seconds a call against a limit sized for Gemini, so a self-hosted base gets 45 seconds a call and 250 for the report instead of 20 and 125, and the page learns which from /runtime-config.js with the hosted waits kept as floors. Against gemma-4-12b on an RTX 5070 Ti a report took one or two calls and 15 to 45 seconds, and two interviews run by hand each ended with a valid report.
A repair that said only which rule a report broke left a local 12B model sending the same answer back. Told that a field named the published problem, it wrote "a 'Two Sum' style problem" twice more; told that the plan and the feedback disagreed, it returned the plan byte for byte. The repair prompt now names the title to drop and the scenario's title to use, and each plan item to change by its index. Both go to the model only: the failure note the candidate reads is unchanged and still never shows the title. Against gemma-4-12b, valid reports went from 2 of 4 to 4 of 4 on the weak-candidate Two Sum prompt, and from 0 of 6 to 10 of 10 on the Two Sum report prompt, where 7 of the 10 broke the plan on their first attempt and were repaired.
The scripted behaviour check and the live phase-judge test posted to Google's URL by hand, so neither could follow CODETRIAL_GEMINI_REST_BASE the way the report does. Both now build the report's URL, so pointed at scripts/gemini-shim.py they send what production sends, tools included, and the judge test prints each judgment it applies. The played candidates keep BEHAVIOR_LOCAL_BASE for talking to an OpenAI-compatible server directly. Against gemma-4-12b with --thinking off the check takes about four minutes, and what it fails on is the model's behaviour, chiefly a hint request answered without log_hint, which is what the results collected in sysprog21#257 compare.
This now carries #99 as well, as asked there. It is rebased onto current
mainand folded into three commits: the self-hosted report path (the base URL, the shim and the longer deadlines), repair prompts that say what to change, and the behaviour check through the shim. The old history is still readable on #99.Summary
The report, the quiet-pause reviews and the interviewer behaviour check can now run on a model on the operator's own GPU instead of Gemini. The live interviewer is untouched and still talks to Gemini.
CODETRIAL_GEMINI_REST_BASE, read from the environment likeINTERVIEW_ROOM_NAME, points everygenerateContentcall at another server. Unset, the URL is what it was.scripts/gemini-shim.py(standard library only) answersgenerateContentfrom llama-server's OpenAI-compatible endpoint. It converts the response schema to the JSON Schema llama.cpp compiles to a grammar, carries function declarations and calls both ways, passes upstream status codes through so a 503 still reads as a 503, and gives up on llama-server when the caller would. A request with no output limit gets one, and--thinking offturns thinking off for every request, which Gemma 4 needs for the behaviour check. A request that asks for JSON without a schema, as the phase judge does, is held to a JSON object: left free, gemma-4-12b fenced its answers and every judgment in an interview was dropped.tests/test_gemini_shim.pyruns in the gate./runtime-config.js, and the page's own values stay the hosted ones as floors.BEHAVIOR_LOCAL_BASEfrom Hold played candidates to the interview rules #107 stays as the direct route, without the shim.Numbers
RTX 5070 Ti, gemma-4-12b Q4_K_M on llama.cpp, shim with
--thinking off:log_hint.One prompt, one machine: read these as "this works end to end", not as a comparison with Gemini.
Test plan
binary_web_gives_a_local_report_base_the_longer_waitstarts the binary with the base set and checks/runtime-config.jssays 280000 and 270; without it, the runtime-config test pins 155000 and 145.report-recovery.test.js: the server can raise the retry wait and cannot lower it.a_local_model_writes_a_reportis an ignored unit test that makes one real report through the base.cargo test1749 passed, 22 ignored;npm test1230 passed and 1 failed, the lobby layout test, which fails the same way onmainon this machine;tests/test_gemini_shim.pypasses; clippy and formatting clean; each of the three commits builds on its own. The mutants run is left to CI on this diff.Tested by hand twice end to end with the report coming from a local model (run 1, run 2). Not tested: anything against Gemini.
Refs #257
Closes #105