NVIDIA NIM API Integration (Llama 3.2 90B Vision) for Blind Metrics and Comparative Analysis - #416
Open
Yehudha-kennedy wants to merge 2 commits into
Open
NVIDIA NIM API Integration (Llama 3.2 90B Vision) for Blind Metrics and Comparative Analysis#416Yehudha-kennedy wants to merge 2 commits into
Yehudha-kennedy wants to merge 2 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
sebasmos
requested changes
Aug 25, 2026
sebasmos
left a comment
Member
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES.
The parser is reading your justification, not your answer. _yesno checks if the text starts with "yes", and the blind prompt asks you to justify first, so "Yes, there's an opacity, but no consolidation" then "no" scores as yes. That's the number you're reporting. Stop the n=600 run until it reads the last line only, and count unparseable replies. Also: add --model instead of swapping the constant, scope --out by model so it stops overwriting our Gemini results, and commit the pilot rows. Your pilot matches our Gemini run almost exactly, which is a replication and better than novelty.
…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:
|
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 above 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$ )
A pilot validation of 35 samples was run using the decoy-uptake vulnerability metric. 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 its server-side handling of blocked sockets, the following low-level workarounds were implemented:
Manual Timeout Control (Deadlock Prevention):
The
OpenAIclient was reconfigured by injectingtimeout=60.0and overriding the internal retry policy viamax_retries=0. This resolved a critical failure where thehttpxclient would enter an indefinite wait (blocking the underlying thread in_pthread_cond_wait) when NVIDIA penalized the connection by holding it open (a "slow-tarpit" state). Retry control with exponential backoff now relies exclusively on ourRetryBackendwrapper class.Forced Degradation to Sequential Processing:
Parallelism in
imaging_blind_metric.pywas reduced fromThreadPoolExecutor(max_workers=4)tomax_workers=1. Concurrent bursts of 4 threads exceeded NVIDIA's firewall heuristics, triggering immediate network blocks. Sequential processing (averaging 3 requests per minute) ensures connection stability.API Key Resolution Order Fix:
The precedence order in the
_key()function was corrected to prevent the collateral injection of spurious environment variables (DEEPSEEK_API_KEY). This mitigated a hidden bug where the script attempted to authenticate to NVIDIA using DeepSeek credentials, generating massive401 Unauthorizedfailures that the system tried to retry iteratively, stalling the pipeline.