arXiv Computer Vision
5d ago

torchtest2: One-Call Sanity Checks for PyTorch Models,Evaluated on Real and Unseen Architectures

torchtest2 is an open‑source library that performs 18 one‑call sanity checks on a single batch of a PyTorch model, restoring any state changes and supporting various model families through plugins. In extensive mutation analysis, it detected 78% of injected silent bugs across 103 pretrained models and 600 random architectures, outperforming the original torchtest and other monitoring approaches. The tool also uncovered real bugs, such as a batch‑coupling issue in timm's GCViT, and demonstrated that many real silent bugs remain challenging for pre‑training model testers.

By Grzegorz Gwardys
arXiv Computation and Language
Oct 19

Pearl-Chat: Engineering a native Luganda language model from first principles in JAX and Flax NNX

Pearl-Chat is an 8.5‑million‑parameter causal decoder‑only transformer built from first principles in JAX and Flax NNX, specifically engineered for the low‑resource Bantu language Luganda. It uses a byte‑level BPE tokenizer trained from scratch on curated Luganda corpora, achieving a two‑fold compression improvement over larger models like LLaMA‑3 and Gemma. The model is trained in two stages—pre‑training on diverse Luganda text and instruction fine‑tuning on dialogues—reaching a validation perplexity of 1.20 and high ROUGE‑L and BLEU scores on a held‑out diagnostic benchmark, with all weights, tokenizers, and code released openly.

By Wesley Kambale, Roland Sankara
arXiv AI
Aug 20

Latent Space Refusal Anchoring for Low-Resource African Languages: Mechanistic Safety Recovery Without Retraining

The paper introduces Latent Space Refusal Anchoring (LSR‑Anchoring), a training‑free technique that extracts a refusal direction from English prompts and applies it to the residual stream of instruction‑tuned models at inference time. The primary variant, Mean‑Activation Steering (MAS), works across several architectures (Llama‑3‑8B, Llama‑3.1‑70B, Mistral‑7B‑Instruct, Qwen2.5‑7B), restoring safety for low‑resource African languages with minimal performance loss, while a refined SAE‑Derived Steering (SDS) further reduces KL divergence without degrading legitimate prompt performance. The method shows positive transfer for Yoruba, Igbo, Igala, and Hausa, but fails for Arabic, suggesting a geometric mismatch rather than a data scarcity issue.

By Godwin Abuh Faruna