skills/nlp/dropout-disabled-inference/SKILL.md
Explicitly zero all dropout probabilities in transformer config at load time for fully deterministic inference
npx skillsauth add wenmin-wu/ds-skills nlp-dropout-disabled-inferenceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
model.eval() disables dropout at the module level, but some transformer implementations read dropout rates from the config during forward passes (e.g., custom attention implementations, flash attention paths). Explicitly setting all dropout config values to 0.0 before loading weights guarantees deterministic inference regardless of implementation details.
from transformers import AutoConfig, AutoModel
config = AutoConfig.from_pretrained('model_path', output_hidden_states=True)
config.hidden_dropout = 0.0
config.hidden_dropout_prob = 0.0
config.attention_dropout = 0.0
config.attention_probs_dropout_prob = 0.0
model = AutoModel.from_pretrained('model_path', config=config)
model.eval()
AutoConfig.from_pretrained()model.eval() as usualhidden_dropout_prob and attention_probs_dropout_prob; RoBERTa/DeBERTa may add hidden_dropout, attention_dropout; check your model's config.jsonmodel.config.update({"hidden_dropout_prob": 0}) post-load, but pre-load is cleanerdata-ai
Scaled Pinball Loss (SPL) metric for evaluating quantile forecasts, normalized by mean absolute successive differences of training data
data-ai
Walk backward through a time series and multiplicatively rescale segments when jumps exceed a fraction of the running mean to correct data collection anomalies
testing
Transform forecasting target to next/current ratio minus one so that optimizing MAE or squared error implicitly minimizes SMAPE
tools
Convert point forecasts to prediction intervals by scaling with logit-transformed quantile ratios passed through a Normal CDF