Search arXiv⌕ Search

arXiv subjects

Ryszard Staruch

Publications and source records attributed to Ryszard Staruch.

5 recordsLinked to original sources

Prompt-Based Speculative Decoding for Grammatical Error Correction

Speculative decoding accelerates LLM inference by drafting tokens that the target model verifies in parallel, making the output exactly the same as with standard decoding. Grammatical error correction (GEC) is a natural fit -- the output largely reuses spans of the input, so drafts can be taken from the prompt itself. Prior work on prompt-based speculation for GEC, most notably aggressive decoding (AD), targets seq2seq models evaluated only at batch size 1. We present the first systematic study of prompt-based speculative decoding for GEC with decoder-only LLMs under batched serving, covering aggressive decoding and n-gram drafting across English, German and Ukrainian document-level datasets and batch sizes up to 128. Prompt-based drafting reaches a 12.24x speedup at batch size 1, whereas a draft-model baseline is slower than autoregressive decoding in 53 of 60 configurations. We further introduce PAN-SD, a position-aware variant of n-gram drafting that breaks ties among equally long matches by alignment with the source rather than earliest occurrence. It improves the acceptance rate in all configurations and throughput in most, at no additional cost. We release our code, data and models.

cs.CL↗

Precision--Recall Trade-off on the Inference Level for LLMs in Grammatical Error Correction

Large language models (LLMs) have recently been adopted for Grammatical Error Correction (GEC), achieving strong performance via both full fine-tuning and prompt-based approaches. As probabilistic sequence models, LLMs expose inference-time parameters that directly modify token generation behavior; however, their potential for controlling GEC-specific trade-offs has not been systematically studied. In this work, we investigate decoding strategies for grammatical error correction. We show that the repetition penalty parameter enables controllable adjustment of the precision--recall trade-off at inference time, without modifying the model architecture, training procedure, or prompt. Through experiments on standard GEC benchmarks, we demonstrate that repetition-penalty-based decoding enables inference-time control of the precision--recall balance, conceptually related to methods previously proposed for sequence-to-sequence GEC models, such as Align-and-Predict Decoding (APD), while remaining simple and broadly applicable to existing LLMs that expose inference-time decoding penalties.

cs.CL↗

Adapting LLMs for Minimal-edit Grammatical Error Correction

Decoder-only large language models have shown superior performance in the fluency-edit English Grammatical Error Correction, but their adaptation for minimal-edit English GEC is still underexplored. To improve their effectiveness in the minimal-edit approach, we explore the error rate adaptation topic and propose a novel training schedule method. Our experiments set a new state-of-the-art result for a single-model system on the BEA-test set. We also detokenize the most common English GEC datasets to match the natural way of writing text. During the process, we find that there are errors in them. Our experiments analyze whether training on detokenized datasets impacts the results and measure the impact of the usage of the datasets with corrected erroneous examples. To facilitate reproducibility, we have released the source code used to train our models.

cs.CL↗

LLMzSzŁ: a comprehensive LLM benchmark for Polish

This article introduces the first comprehensive benchmark for the Polish language at this scale: LLMzSzŁ (LLMs Behind the School Desk). It is based on a coherent collection of Polish national exams, including both academic and professional tests extracted from the archives of the Polish Central Examination Board. It covers 4 types of exams, coming from 154 domains. Altogether, it consists of almost 19k closed-ended questions. We investigate the performance of open-source multilingual, English, and Polish LLMs to verify LLMs' abilities to transfer knowledge between languages. Also, the correlation between LLMs and humans at model accuracy and exam pass rate levels is examined. We show that multilingual LLMs can obtain superior results over monolingual ones; however, monolingual models may be beneficial when model size matters. Our analysis highlights the potential of LLMs in assisting with exam validation, particularly in identifying anomalies or errors in examination tasks.

cs.CL↗

Oddballness: universal anomaly detection with language models

We present a new method to detect anomalies in texts (in general: in sequences of any data), using language models, in a totally unsupervised manner. The method considers probabilities (likelihoods) generated by a language model, but instead of focusing on low-likelihood tokens, it considers a new metric introduced in this paper: oddballness. Oddballness measures how ``strange'' a given token is according to the language model. We demonstrate in grammatical error detection tasks (a specific case of text anomaly detection) that oddballness is better than just considering low-likelihood events, if a totally unsupervised setup is assumed.

cs.CL↗