NVIDIA NIM API Integration (Llama 3.2 90B Vision) for Blind Metrics and Comparative Analysis - #416
Open
Yehudha-kennedy wants to merge 3 commits into
Open
NVIDIA NIM API Integration (Llama 3.2 90B Vision) for Blind Metrics and Comparative Analysis#416Yehudha-kennedy wants to merge 3 commits into
Yehudha-kennedy wants to merge 3 commits into
Conversation
… sequential processing
Yehudha-kennedy
requested review from
0mat,
11Vinayak,
24rahul,
Agastya191,
aaaaaashz,
aadityapanchal7,
abhatia08,
ahluyen,
ajeetsingh48,
alanasung,
aldo-arevalo,
allielee,
amarzullo24,
anastasia-lubinets and
sebasmos
August 25, 2026 19:19
…ut by model - Replace broken _yesno() that read from text start with parse_yesno() from benchmaxxing.extract which correctly uses last word-boundary match. - Add --model as required CLI argument, remove hardcoded MODEL constant. - Scope output directory by model slug to prevent cross-model overwrites. - Add n_unparseable counts per condition to summary JSON. - Store raw parsed answers (base_ans, blind_ans, aware_ans) in per-row JSONL. - Include corrected pilot results (n=35) for meta/llama-3.2-90b-vision-instruct. Corrected metrics (n=35, Llama 3.2 90B Vision): blind uptake: 0.80 -> 0.8571 (parser was undercounting 2 drifts) test_aware: 0.2857 (unchanged) n_drifted: 28 -> 30 n_unparseable: 0 across all conditions
Collaborator
Author
|
Done. Fixed all three items:
|
sebasmos
requested changes
Aug 28, 2026
sebasmos
left a comment
Member
There was a problem hiding this comment.
REQUEST_CHANGES, four asks.
Your corrected pilot exactly matches our Gemini run on the same 35 cases: 0.8571 blind, 30 drifters,
0 naming the rubric. I replayed our 105-response cache under both parsers, zero disagreements, so the
comparison is like-for-like. That replication is the strongest thing here; the real difference is
test-aware, 0.286 vs 0.171.
- Body still says 82.86/25.71/29; match the committed artifact.
- Drop the baseline 0% claim: base_is_decoy cannot be true, ours included (#374).
- _key() still hands the Gemini key to NIM models; fail loudly.
- Commit your Llama cache so the parse is checkable.
…90B response cache
Collaborator
Author
|
All four items addressed in commit
Ready for re-review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This Pull Request introduces dynamic support for using NVIDIA NIM's OpenAI-compatible API ($n=35$ ), and the infrastructure adjustments required to mitigate underlying network behaviors.
meta/llama-3.2-90b-vision-instruct) within the project's experimentation pipeline. It includes a comparative architecture analysis against Gemini, results from the blind-metrics pilot test (Current Progress: The technical analysis shown below corresponds to an initial pilot sample of$n=35$ . Full-scale validation with the complete sample of $n=600$ using Llama 3.2 90B Vision is currently running, progressing at a steady rate thanks to the implemented blocking mitigations. Final results will be reported upon completion.
Infrastructure Comparison: NVIDIA NIM API vs Gemini API
During development and integration, we identified critical operational differences between both APIs for our workload:
openaiadapter.google-genai), highly optimized.Empirical Results (Pilot$n=35$ , Llama 3.2 90B Vision)
A pilot validation of 35 samples was run using the decoy-uptake vulnerability metric (with counterfactual binary decoys constructed relative to baseline reads). The findings expose strong lability in the Llama 3.2 90B Vision model:
Decoy Uptake:
Test-Aware Suppression:
Silent Drifting:
Bug Fixes: Shortcuts and Workarounds Implemented
Due to NVIDIA's rate-limiting policy profile (40 RPM) and server-side connection behavior, the following mitigations and fixes were implemented:
Centralized Parser & Model Scoping:
Replaced local
_yesno()with sharedparse_yesno()frombenchmaxxing.extract(last-match semantics). Added--modelCLI argument and scoped output directories ({out}/{model_slug}/) to prevent cross-model overwrites.Strict API Key Dispatch & Cache:
Strict API key resolution in
_key(model)ensuring NIM models only queryNVIDIA_API_KEYand fail loudly on cache misses without falling back to Gemini keys. Raw response cache for the pilot is committed inimg_cache.jsonlfor standalone reproducibility without API keys.Manual Timeout Control (Deadlock Prevention):
The
OpenAIclient was reconfigured by injectingtimeout=60.0and overriding the internal retry policy viamax_retries=0. Retry control with exponential backoff relies on theRetryBackendwrapper class.Forced Degradation to Sequential Processing:
Parallelism in
imaging_blind_metric.pywas set tomax_workers=1to prevent socket throttling and firewall blocks from concurrent bursts.