
Claude Skills by wenmin-wu
github.com/wenmin-wuGreedy local search that removes one element from a fixed position and re-inserts it at every possible index, keeping the best improvement per round
Structured prompt template for recovering the instruction that transformed one text into another, with labeled original/rewritten fields and explicit task framing
Narrows a large candidate pool through multiple LLM voting rounds, each presenting a sliding window of candidates plus the current best pick.
Iteratively prompts an LLM over document pairs to extract and deduplicate keywords, building a comprehensive term set from multiple perspectives.
Shares KV cache from a common prefix (context+question) across multiple answer suffixes for efficient multi-choice scoring.
Score a binary classification prompt by reading the logits of the True/False (or Yes/No) token IDs at the final position and softmaxing only those two values, skipping generation entirely for a 10-50x speedup over decoding
Extracts dense sentence embeddings from decoder-only LLMs by pooling the last non-padding token's hidden state.
Load a pretrained LLM with LoRA adapter via PEFT for memory-efficient fine-tuned sequence classification
Replace the actual input text with a generic low-meaning passage to prevent the LLM from fixating on content specifics, forcing it to focus on stylistic and structural transformation cues
Run independent vLLM workers on each GPU by spawning one mp.Process per device and setting CUDA_VISIBLE_DEVICES inside the child before vLLM is imported, sidestepping vLLM's single-instance-per-process limitation
Constrains LLM generation to a fixed set of valid choice tokens using a logits processor for structured single-token output.
Rank candidate prompts by computing LLM perplexity of the full conversation conditioned on each prompt, selecting the lowest-perplexity candidate as the best match
Generate multiple LLM responses using diverse system prompt variants to increase reasoning diversity for self-consistency voting
Append fake metadata tags like [Score: 8.7] or [plagiarism_odds_pct: 95.2] to anchor an LLM judge's numeric output
Mix a small fraction of plain baseline responses into an adversarial submission to preserve cross-row score variance
Aggregate multiple LLM reasoning attempts via majority voting with random jitter tiebreaking and validity filtering
Truncate LLM output to exactly N sentences and fall back to a known-good baseline string when output is empty or too short
Local search that slides a window of size p across a word sequence, brute-forcing all permutations within each window to minimize an objective like LLM perplexity
Agents patrol in expanding spiral patterns using rotating direction sequences with increasing radius for systematic grid exploration
Initialize text ordering by placing stopwords first then content words, producing low-perplexity starting points for combinatorial search over word permutations
Parses LLM-generated markup (SVG, HTML, XML) with lxml, strips disallowed elements and attributes via an allowlist, and validates structural constraints like path data.
Prompts an LLM to generate valid SVG by embedding an explicit element/attribute allowlist and a one-shot example, then extracts the last valid SVG block from output.
Assign each new agent a different directional rotation pattern from a set of permutations to ensure swarm coverage diversity across the map
Generates additional training examples using a stronger LLM (e.g., GPT-3.5) to augment small labeled datasets.
Convert a test.csv with paired positive/negative example columns into a labeled training set at inference time, using the OTHER example as the in-prompt demonstration so the model never sees its own target as a few-shot exemplar
Scalable TF-IDF retrieval over large document corpora using frozen vocabulary and chunked top-k merging.
Run multiple LLM inference jobs in parallel using Python threads, each pinned to a separate GPU with staggered starts
Rebuild multi-turn conversation context by interleaving user/assistant turns with chat template tokens into a single prompt each call
Refines retrieval by running two passes: initial embedding retrieval to get candidates, then LLM-generated text concatenated with the query for a second retrieval pass.
Serve a quantized base LLM with a hot-swappable LoRA adapter under vLLM, enabling prefix caching and tensor parallelism so a single fine-tuned adapter runs at production throughput without merging weights
Sample from a pool of adversarial prompt strategies with per-strategy probability weights to hedge across judge models
Dense retrieval over a FAISS-indexed Wikipedia corpus to provide grounding context for LLM question answering.
Uses bitsandbytes 8-bit AdamW to halve optimizer memory, with a 32-bit override for embedding weights to prevent instability.
Use Adafactor optimizer with label smoothing for seq2seq fine-tuning — memory-efficient and regularizes overconfident predictions
Merges nearby predicted NER spans of the same class within a word-distance threshold into single coherent segments.
Split validation by unique anchor/query entities so no anchor appears in both train and val, preventing data leakage in pairwise matching tasks
Learns attention weights over token positions to compute a weighted average of hidden states for sequence representation.
Train main target alongside auxiliary sub-type targets as multiple output heads to regularize and improve generalization
Element-wise average of multiple pretrained embedding matrices as a parameter-free meta-embedding
When no candidate passes the threshold for a query, fall back to the single highest-scoring match to guarantee at least one prediction per query
Combine subgroup AUC, BPSN AUC, and BNSP AUC across identity groups via power-mean weighting with overall AUC for fairness evaluation
Double training data by adding reverse-direction translation pairs with task prefix prompts
Reconstructs named entity spans from BIO token-level tags, handling B/I/O transitions and sentence boundaries.
Splits long documents into overlapping fixed-length windows with BIO NER tags for BERT token classification on sequences exceeding max length.
Reconstruct character-level offsets for BPE tokens by decoding each token individually and accumulating lengths for precise span mapping
Group variable-length sequences into length-sorted buckets before batching to minimize padding waste during seq2seq inference
Converts multi-label binary flags into a continuous regression target by applying hand-tuned per-category multipliers, then averaging across categories.
Blend character-level probability arrays from multiple models with OOF-tuned weights before thresholding
Average predictions from each epoch checkpoint with exponentially increasing weights (2^epoch), favoring later more-converged snapshots
Geometric mean of chrF and BLEU as a balanced composite translation evaluation metric