Skip to content
STANISŁAWResearch project · AGH University of Krakow
AGH · WWNiGFaculty of Drilling, Oil and Gas
PL

Research project · AGH University of Krakow

Stanisław.

Stanisław 3B completed all 57,000 pretraining steps.

Stanisław on the world · 19 November 2026

Po czym poznajesz, że nadchodzi wiosna?

Wiosna to czas, kiedy wszystko budzi się do życia.

English translation: “How can you tell that spring is coming?” — “Spring is a time when everything comes to life.”

After pretraining, we gave the base model six questions we had written in advance, each separately and only once. We selected an excerpt from its answer about spring.

A Polish engineering model

To our knowledge, this is the first publicly documented project in Poland to combine a 3B-class language model trained from scratch with its own engineering solvers.

We trained the base model to predict the next token, without distillation from a teacher model.

In memory of Prof. Stanisław StryczekScientist, teacher, engineer.Meet our namesake
Our own modelTrained from scratch
Verifiable calculationsComputational tools in Rust
Research in the openMethods, measurements, limitations

01 / The project

A question in plain language.
An answer from calculations.

Engineers need results they can check. We separate understanding the question, performing the calculation and working with sources. Drilling is the project’s first field of application.

  1. 01

    Question and inputs

    The model identifies the task, selects a tool and passes the inputs with their units.

  2. 02

    Calculation

    A solver follows a defined method and checks whether the inputs are within its scope.

  3. 03

    Result and explanation

    The answer uses the tool’s output. When information is missing, the right next step is to ask for it.

A closer look

One question. Two situations.

The engineer’s question

The drilling fluid density is 1.20 kg/dm³. What is the hydrostatic pressure at a true vertical depth of 1000 m?

Inputs → solver → result
Hydrostatic pressure

11.77 MPa

ρ = 1200 kg/m³ · h = 1000 m

A recorded calculation example, not a conversation with a running model. p = ρgh; g = 9.80665 m/s².

02 / Results you can assess

Progress, measured.
Limitations, reported.

We evaluate answers on held-out questions and record the errors. A good score on one set does not mean the model can handle every task.

98.9%
solver result agreementBasic test of new tools · SFT11, intermediate 3B model. Pilot test, question templates known from training.
26/36
correct results on confusable pairsQuestions about similar tools still expose mistakes. Pilot test, question templates known from training.
46.1%
New questionsPublic part of the benchmark, 3B after the pilot with unit-field correction (31.6% without it), 14 Nov 2026.

Pilot results published on 13 November 2026, benchmark result on 14 November 2026. Test scope and comparisons are explained in the Research chapter.

The Stanisław book cover

03 / Inside the workshop

From an idea
to our own model.

How is Stanisław built? What does the solver calculate, and what does the model learn? Our book follows the decisions, experiments and results, with explanations for engineers new to machine learning.

Research staff and friendly external collaborators

Download the book 58 pages · PDF in Polish · working edition, November 2026Explore the contents

The current version of Stanisław 3B is being fine-tuned. Until then you can talk to its previous, original version.

02 / Ask · the original version

The original Stanisław:
LoRA, RAG and solvers.

Before the model trained from scratch, we built an assistant from existing parts: a large open language model, a drilling knowledge base and solvers. It takes knowledge from sources and numbers from calculations, and when the sources do not cover something, it should say that it does not know.

  • Model and LoRA

    Qwen 3.8 with 27 billion weights, open weights, on a Tesla V100 card of the Faculty server. LoRA fine-tuning was part of this version: on an earlier base model the adapter improved numerical accuracy but weakened source citation and admitting uncertainty, so conversations are now served by the model without the adapter, with behaviour set by rules and knowledge cards.

  • Knowledge from sources (RAG)

    More than 250,000 passages: drilling literature, Faculty teaching materials, a monograph on drilling fluid rheology and formula cards. The few best-matching passages reach the answer.

  • Calculations

    Numbers come from solvers written in Rust or from calculation code executed with checks. Each answer shows whether it came from a calculation or from knowledge.

Original version

Ask a drilling question or pick one from the list. An answer may take up to a minute. Questions are handled one at a time, so at busy moments you may need to wait. You can ask follow-up questions: the model remembers the last ten exchanges of this conversation.

The conversation is not stored in your browser and disappears when you close the page. We record questions and answers without IP addresses to analyse answer quality; do not enter personal data. This is a research tool: answers may contain errors and do not replace an engineering design or decision.

Namesake

Prof. Stanisław Antoni Stryczek, PhD, DSc, Eng. (1946–2024)

Portrait of Prof. Stanisław Stryczek, pencil sketch
Pencil sketch based on a photograph from the Historia AGH website. The line drawing in the page header and on the book cover was made from this sketch with an image generator.
Stanisław Antoni Stryczek
born 10 October 1946 in Zakopane, died 6 February 2024 in Krakow
An outstanding specialist in drilling engineering and geoengineering. Founder of the Polish school of cement slurries and grouting work.SITPNiG, farewell notice, 8 February 2024

Graduate of the Faculty of Drilling and Oil Engineering of AGH (1970, MSc Eng. in mining, specialization in drilling). Doctorate in 1974 based on the thesis “Filtracja zaczynów cementowych w warunkach wysokich ciśnień i temperatur” [Filtration of cement slurries under high-pressure and high-temperature conditions], habilitation in 1994, title of professor in 2001.

Vice-Dean for Research (1999–2002), then Dean of the Faculty of Drilling, Oil and Gas for two terms (2002–2008). He headed the Division, and later the Department, of Drilling and Geoengineering, and sat in the AGH Senate six times. Long-time editor of the quarterly “AGH Drilling, Oil, Gas”.

Author of more than 430 publications, a dozen or so books, course textbooks and monographs, and several dozen patents; supervisor of doctoral theses and of several hundred diploma theses. His decorations include the Knight's Cross and the Officer's Cross of the Order of Polonia Restituta and the Medal of the Commission of National Education. Member of the Committee of Mining of the Polish Academy of Sciences (PAN) and of the Academy of Engineering in Poland, adviser to the rescue operation at the “Wieliczka” Salt Mine.

According to the memoir by Andrzej Gonet and Jan Ziaja, until his last days he worked on new formulations of sealing slurries to save yet another mine from flooding.

Figures differ between sources: the memoir in NBI and the Inżynieria.com website give 61 patents and eight doctors supervised, Historia AGH gives 35 patents and six doctorates; Historia AGH also gives the period of heading the Department as 2008–2014, the memoir as 2008–2012. The text therefore leaves out the disputed figures.

Who Stanisław is

Jestem Stanisław, polski model inżynierski zintegrowany z solverami, nazwany na cześć prof. Stanisława Stryczka, naukowca z Wydziału Wiertnictwa, Nafty i Gazu AGH. Liczby liczą u mnie deterministyczne solvery, wiedzę biorę z dokumentów, a sam pilnuję, żeby wynik był dobrze użyty i uczciwie opisany. (I am Stanisław, a Polish engineering model integrated with solvers, named in honor of Prof. Stanisław Stryczek, a scientist at the Faculty of Drilling, Oil and Gas, AGH University of Krakow. In my case the numbers are computed by deterministic solvers, I take knowledge from documents, and I myself make sure the result is used properly and described honestly.)

This is how the model is to answer “kim jesteś” (“who are you”) questions. An identity training set and a short document about the namesake for the knowledge base will go into the next fine-tuning (repository kod/generator_tozsamosc.py); the model is to take facts about the Professor from the document, not from the memory of its weights.

Live · zen5

Stanisław 3B training progress

loadingData refreshed every minute; zen5 sends its status every 2 minutes.

Stanisław 1B · Polish base model training

Current batch …

—

Last saved step —

—

Training window ends

Loading the latest confirmed training state…

Stanisław 1B · annealing experiment

We compare two learning-rate schedules on the same data. These steps are counted separately from base training.

No confirmed experiment reading.

Archive · first Polish 1B data batch

First data batch complete · 99/99 steps

Step 99 of 9,537 (1.04%)

This is an early checkpoint of the new base model. The nominal learning-rate schedule spans 9,537 steps. We decide the length of each subsequent run separately.

99 / 99
99 / 99

Weights and optimizer state were saved after the first batch.

This attempt started from scratch. Each update predicted 1,048,576 tokens. The previous attempt stopped after 41 of 99 updates, before weights were saved.

3B annealing · Polish conversation

Both runs start from the same weights at step 51,200. Each runs for 48 updates on eight Blackwell GPUs.

— / 96
— / 48
— / 48

Waiting for a training update.

–

start 10 Nov · warmup to step 2000annealing from step 51,300 →57,000
Throughput
–
Total across 8 GPUs; global batch of 1.05 million tokens per step.
End (watchdog estimate)
–
From the rate of the latest steps.
Latest validation
–
bpb on a held-out part of the 3B mix, every 1000 steps; lower = better.
Watchdog
–
Monitors the process, loss and validation; resumes the run on its own from the last checkpoint and keeps the verified one for a manual rollback.

Validation during pretraining

Blackwell GPU load

Eight RTX PRO 6000 Blackwell 96 GB GPUs. GPUs 0, 1, 6, 7 have a 475 W power limit; GPUs 2–5 are the 300 W versions. Power and temperature are instantaneous readings; during a checkpoint save (every 200 steps) they drop for a dozen or so seconds.

–

Tesla V100 GPU load

Fourteen Tesla V100-SXM2 32 GB GPUs with NVLink (fp16) on two servers: 6 on the Faculty server and 8 on the second server. GPUs labeled “Stanisław” are currently running project tasks (on the Faculty server GPUs 4 and 5, on the second server all of them in the 11–15 Nov window); the others serve other Faculty services. Instantaneous readings, sent every 2 minutes.

–

Progress · 24 Nov 2026

Stanisław 3B has completed pretraining

Each entry has its status marked: done, in progress or planned. Figures come from measurements recorded in the project repository; where a result does not exist yet, we say so plainly.

Stanisław’s first answer to a question about drilling fluid

Po co podczas wiercenia stosuje się płuczkę wiertniczą?

- Do wynoszenia zwiercin na powierzchnię.

English translation: “Why is drilling fluid used during drilling?” — “To carry drill cuttings to the surface.”

The base model gave the same sentence eight times in the 64 tokens it generated.

Hardware

Pretraining
8 × RTX PRO 6000 Blackwell 96 GB
We completed 3B pretraining on these GPUs (bf16). Four 475 W GPUs and four in the 300 W version, connected via PCIe, without NVLink.
Evaluation, fine-tuning, solvers
14 × Tesla V100-SXM2 32 GB, NVLink
6 GPUs on the Faculty server (atari) and 8 on the second server (c64). On the Faculty server GPUs, Stanisław runs evaluation, fine-tuning of the 1B model, solvers and paraphrases (fp16). Four GPUs of the second server are used for fine-tuning and evaluating intermediate 3B weights.

Work of 24 Nov

  1. How well did the new Polish Stanisław 1B predict text at the end of training?v4 run complete

    After 5,001 steps the new base model had used every complete batch in the prepared corpus. It trained on 5,243,928,576 tokens. We saved the final weights and optimizer state so training can resume from this point.

    On the same 512 Polish passages from PolEval, the model scored 0.986044 bits per byte (BPB). Lower scores mean better predictions of the text that follows. At step 4,821 the score was 0.984876. The change over the final 180 steps was +0.001168 BPB, with a 95% confidence interval from −0.002400 to +0.004760. The interval spans both improvement and deterioration.

    In the same test, the previous Stanisław 1B scored 0.909020 BPB after 27.997 billion training tokens. The larger Bielik-11B-v2 scored 0.812844. Each model received the first token of each passage as context. We divided the loss from the second token onwards, measured in bits, by the total number of bytes in the text.

  2. Did annealing improve Polish text prediction?matched training data

    We returned to the weights from step 4,821. Two versions of the model saw the same 132,120,576 tokens in exactly the same order. For 126 steps the first kept a learning rate of 0.0004. In the second we gradually reduced it to 0.00004. We evaluated both at step 4,947.

    On 512 Polish passages, using the same method as in the final base model evaluation, the score improved from 0.980788 to 0.963411 BPB. The annealed model predicted the text more accurately in 377 of the 512 passages. The difference was −0.017377 BPB, with a 95% confidence interval from −0.019581 to −0.015184. A second protocol scored the first token as well, adding an EOS marker before each passage. Under this protocol the score fell from 1.036347 to 1.019983 BPB.

    In a separate test with 20 generations, both versions gave three answers containing short loops. Neither version answered both questions correctly in any of the four pairs in which we varied a cue. Annealing helped text prediction. Both models still struggled to respond to the changed information in these probes.

    Two AI reviewers separately compared 20 pairs of answers with model names hidden. The first preferred the annealed model in 7 pairs and the control in 4, with 9 ties. The second recorded 9, 4 and 7 respectively. They agreed on 18 pairs. We are keeping the annealed model as a base for further fine-tuning. Public chat testing still needs a model that reliably answers the question asked.

    We fine-tuned both step-4,947 bases with LoRA, repeating selected dialogues twice. Each adapter took 62 updates on 11,298 response tokens. On the earlier 28 questions, both models ended 0 of 28 replies on their own before fine-tuning and 27 of 28 afterwards. Two AI reviewers read the answers with model names hidden. One judged that each model fully followed 1 of 28 requests. The other scored each model 2 of 28. In a new test fixed before fine-tuning, an AI reviewer judged 2 of 12 control answers and 3 of 12 annealed-model answers correct. Both models ended all 12 replies on their own. When a key fact changed, both scored 0 of 6 complete pairs, including 0 of 2 that required remembering the previous turn. The conversation tests leave the comparison unresolved.

  3. Did repeating dialogues help the model converse?28 questions and a second-turn test

    We trained two LoRA adapters on the final 1B base. Each received 496 examples and 11,298 response tokens to predict. The first adapter saw 20 selected dialogues twice and the second saw them four times. In the first variant, different examples of the same length took the place of the extra repetitions.

    On 28 held-out questions, the base model reached the length limit every time. With either adapter it ended 26 of 28 answers on its own. We detected repetition in nine base answers and in one answer from each adapter. The two adapters produced exactly the same text on 22 questions.

    An AI reviewer read the answers with the variant names hidden. In 26 of the 28 sets, none of the three answers addressed the question correctly. The remaining two sets produced ties. In a separate test, the model gave its own first reply and we then varied a detail in the follow-up. Each of the three variants used the detail correctly 0 times out of 8. Fine-tuning helped the model end its replies. Answering the question remains the next challenge.

    We also checked whether conversation history reaches the model. We changed one token in a 25-token input by altering an earlier message and keeping the current question fixed. All three variants changed their answer. Each adapter recalled the earlier information correctly in one of the two trials.

  4. What did the model read towards the end of training?measured on the data used

    We traced the source of the tokens used to update the model weights. Texts in the institutional category supplied 16.81% of training targets over the whole run. In the last 54 steps, their share reached 90.76%.

    The dedicated dialogue and LUNA telephone conversation categories together supplied 24,221 target tokens. Debates, transcripts and online conversations also appear elsewhere in the corpus. To check how the model handles a conversation, we separately evaluated the answers it generated to Polish questions.

Work of 23 Nov

  1. How well does Stanisław 1B predict Polish text after five billion tokens?interim result

    By step 4,821, the new Stanisław 1B base model had seen 5.055 billion training tokens. On 512 Polish passages from the public PolEval development set it scored 0.984876 bits per byte (BPB). The previous Stanisław 1B scored 0.909020 BPB after 27.997 billion tokens, and the Bielik-11B-v2 base model scored 0.812844 BPB. A lower score means the model predicted the text more accurately.

    All three models read the same 75,704 bytes. Each received the first token of every passage as context and predicted the text from the second token onward. Our separate training evaluation also scores the first token, which gives a different value. We evaluated the new 1B on a CPU in FP32 and the previous 1B on a GPU in FP32 using weights stored in BF16. Bielik ran on a GPU in FP16, with the loss computed in FP32. We will assess conversational responses separately after fine-tuning.

  2. How much Polish text had our training pipeline missed?data verified

    We revisited articles omitted during earlier data preparation. Across six batches we verified the source of 30,688 articles from the Polish portion of the FineWeb2-HQ+ web corpus and confirmed that their 25,525,231 tokens were present in the training files.

    We also found Polish Wikipedia articles that the reader had stopped before processing. After checking them against previous batches and the validation set, we accepted 4,422 articles totalling 3,788,644 tokens.

Work of 22 Nov

  1. How did Stanisław 1B’s Polish change between steps 99 and 399?new v4 base model

    By step 399, Stanisław had trained on 418.4 million next-token predictions, each token representing a fragment of text. On the same 512 Polish texts from PolEval, the model scored 2.971 bits per byte (BPB) at step 10, 2.148 at step 99 and 1.668 at step 399. The 22.4% drop between the last two measurements means the model got better at predicting what actually came next in these texts.

    What could it write on its own? At both steps, we gave it the same 20 questions and passages to complete, always choosing the most likely next token. At step 99, the model produced nothing but line breaks in 13 trials. At step 399, it did so only once. The number of trials with a detected loop fell from 20 to 16. In the other four, the model produced sequences of numbers and dates. Asked which countries lie on either side of the English Channel, it listed years.

    At both steps, all 20 outputs reached the 64-token limit. The model never ended an answer on its own. In four pairs of tasks that differed by one condition, it never answered both variants correctly. We can measure its progress at predicting Polish text. Answering questions accurately remains an open task. See the training progress of the Polish 1B model.

  2. Does repeating the request help when the user adds a detail?eight pairs of conversations

    In each pair, Stanisław 3B with the LUNA adapter at half strength received the same opening request, followed by two different details in separate conversations. On the first four pairs, ordinary conversation history produced 0 correct second replies out of 8. When we repeated the opening request alongside the new detail, the model got 3 of 8 right and answered both versions of one pair correctly. On four held-out pairs, ordinary history produced 1 correct reply out of 8, and repeating the request produced 0 of 8. Neither approach answered both versions of any held-out pair correctly. In one example, six of nine jackdaws flew away. Asked how many remained on the roof, the model repeated the number that flew away and missed the three remaining birds. We kept the existing way of passing conversation history in the chat panel.

  3. Does Stanisław change its answer when a fact changes?16 tasks, three versions each

    We compared the model annealed on Polish material with the same model fine-tuned on 87 Polish examples. We selected 16 tasks from the fine-tuning data. For each task we ran three separate, single-turn trials. We used the original wording, rephrased the question, then changed a fact or instruction so that the correct answer had to change.

    The base model answered 4 of 16 original questions correctly, and the fine-tuned model answered 7. On rephrased questions the score rose from 2 to 8 correct answers. After a fact or instruction changed it rose from 5 to 6. The base model got all three versions right for 1 of 16 tasks, and the fine-tuned model did so for 3.

    Asked who the fifth daughter of Kasia’s mother was, the fine-tuned model answered “It’s Kasia.” When we changed the riddle to Ewa’s mother, it answered “The fifth daughter is Oliwia.” The model finished all 48 answers on its own and we detected no signs of looping. On this deliberately selected set, the biggest gain came when a familiar question was worded differently. Adapting to changed information improved much less.

  4. Do more Polish texts help Stanisław hold a conversation?two runs of 48 steps each

    We ran two training experiments of 48 steps each from the same Stanisław 3B checkpoint. The first reused earlier material. In the second, we replaced about 20% of the tokens with new Polish texts, mostly textbooks. Conversations made up about 1.5% of the whole training sample. Both versions trained on the same number of tokens.

    On 512 short Polish texts, we measured in full precision (FP32) how well the model predicted what came next. Lower scores in bits per byte (BPB) are better. The starting model scored 0.88492, the version trained on earlier material scored 0.88211, and the version with new texts scored 0.88185. The new texts gave a small advantage on this measure.

    We also assessed answers generated without hints or tools. We changed one fact in each pair of questions. Both versions had to be answered correctly for the pair to count. Before conversational fine-tuning, all three models passed the same 2 of 16 pairs. We then fine-tuned each model on the same 87 answers written by people in Polish. All three passed the same 4 of 16 pairs. Of 8 open-ended requests, the starting model and the control fulfilled 1 each. The model trained on the new Polish material fulfilled none.

    Across 16 multi-turn conversations, none of the models completed a single request from start to finish. The evaluator read the answers without knowing which model had written them. The version trained on new Polish material gave a number unsupported by the conversation in 4 of 36 replies, compared with 10 of 36 for the control. When the user added information or corrected a detail, none of the models gave a complete answer in the second turn. The results fell short of the criteria we set before training for a longer run.

Work of 21 Nov

  1. Can Stanisław use the answer to its own question?16 conversations in Polish

    Three versions of Stanisław 3B received the same tasks. In a conversation about printing cards, the model asked how many to order. When the user answered “half a dozen”, the version trained on conversational histories treated it as a product name and added the number 100. Each version completed 0 of 16 conversations correctly from start to finish.

    Both new versions asked for the right missing information in 2 of 6 situations. The previous version did so in 1 of 6. The new versions introduced unsupported numbers more often. Across 36 responses each, this happened 8 times after training on conversation histories, 6 times after training on complete facts in a single message and 4 times with the previous version. We kept the previous weights in the testing interface.

    What could the model read on its own? A separate test used short notes. One gave an inlet temperature of 36 °C and an outlet temperature of 51 °C. Asked for the inlet temperature, the model answered “36 °C.”. When the measurements changed places, it answered “51 °C.”. Each version answered both notes correctly in 2 of 8 pairs. The models generated their own answers without retrieval or external solvers.

    In a further test the previous version received 12 new pairs of notes. We supplied two possible answers and measured which one the model preferred after reading the note. It chose correctly on 12 of 24 individual questions, but kept its original choice in every pair after the fact was reversed. When allowed to write its own answer, it answered 9 of 24 questions and 0 of 12 full pairs correctly. After the test we looked at the scores for both answers. In 10 of the 12 pairs, changing the fact shifted the scores towards the correct answer. The original preference still outweighed the change every time.

Work of 20 Nov

  1. How much of a task can Stanisław handle on its own?dialogue, context and calculations

    Does a weaker adapter help in conversation? On 18 new tasks, Stanisław solved 5 with its Polish C+LUNA adapter at half strength and 2 at full strength. It completed 2 of 6 whole conversations at half strength and 0 of 6 at full strength. It answered the second turn correctly in 3 of 6 conversations at half strength and none at full strength. Reducing the strength gained four tasks and lost one. A single model scored the anonymised answers. The result remains experimental in this small sample (p = 0.375). Separately, on 512 previously used Polish sentences, text prediction took 0.85833 bits per byte for the base without the adapter, 0.86386 at half strength and 0.88161 at full strength. Lower values indicate better text prediction.

    How many passages does the reader need? In five new documents, we placed a fact more than 3,300 tokens before the question. Each document had two versions that differed in that fact. Given only the highest-ranked passage, Stanisław answered 8 of 10 facts correctly and got both versions right in 3 of 5 pairs. With a second passage, it answered 6 of 10 facts correctly and got both versions right in 2 of 5 pairs. The model read the retrieved passages within its native 2,048-token window. We required an answer in this trial because the experimental filter blocked responses even when the evidence was present.

    Dialogue and reworded instructions. We tested 12 new instructions and 12 two-turn conversations. The model tuned on Polish instructions completed 1 of 24 scenarios, and the earlier dialogue model completed 2 of 24. Both completed 0 of 12 whole conversations. In a separate trial, both instruction-tuned models answered all 12 familiar training pairs correctly. When we rephrased the questions without changing the facts, the Polish-only model passed 3 of 12 pairs and the Polish-English model passed 4 of 12.

    Reading a distant fact. We moved one sentence containing the answer within texts of equal length. Each case had two versions with different facts. With the evidence close to the question, the dialogue model passed 7 of 8 pairs and the model tuned to read excerpts passed 6 of 8. With about 1,600 tokens between the fact and the question, both passed 4 of 8. After we removed the evidence, neither model acknowledged the missing information in any of the eight cases. All trials fit within the 2,048-token window.

    Calculating and reporting an answer. We selected the correct function and supplied the dimensions to calculate the volume inside or around a pipe. Given the resulting volume in m³, Stanisław generated the correct number and unit in 96 of 96 new trials. In a separate, previously used test, the system also had to choose the function and assign each dimension. It solved 8 of 22 calculation tasks from start to finish. It correctly skipped the calculation for the remaining 32 questions.

  2. When does a coherent reply actually answer the question?24 tasks in Polish

    After dialogue tuning, Stanisław ended all 24 responses on its own before the length limit. In 20 of 24 it stayed coherent from start to finish. It gave a correct and coherent answer to 2 of 16 everyday questions and produced a sensible and coherent continuation for 2 of 8 prose openings.

    Before testing, we set the threshold for inviting a broader group of testers at 12 of 16 questions and 6 of 8 continuations. The model remains in supervised research testing. We assessed each response in full, including its ending.

    In a separate test on 1,024 held-out Polish sentences, the newer base model recorded 0.868282 bits per byte, compared with 0.872036 for the earlier weights. BPB measures text prediction. The dialogue tasks also tested whether the generated response addressed the question.

  3. Does Stanisław change its answer when the source changes?six pairs of facts

    In a private trial on research articles, the retriever returned a passage containing the full answer within its first two results for 7 of 8 new questions. The previous version achieved 4 of 8. We then tested whether a retrieved fact changed the model’s answer.

    We wrote six simple questions, each with two short notes. For each pair we changed one fact and kept the question identical. A separate test index retrieved the correct document in all 12 trials with a note. We also ran each question without a document.

    The earlier base answered both versions correctly in 0 of 6 pairs. The newer base achieved 0 of 6. We scored the entire independently generated response. Finding the right word somewhere in an otherwise incorrect answer was insufficient.

    Without a document, the earlier base explicitly acknowledged the lack of information in 0 of 6 trials, and the newer base in 0 of 6. Both base models answered without the dialogue adapter in this trial.

  4. Is Stanisław getting better at predicting Polish text?five evaluation sets

    On a separate 1,024 PolEval sentences, the new weight average confirmed the improvement. BPB fell from 0.872036 to 0.868282. Prediction improved on 691 sentences and worsened on 333. The difference was −0.003754 BPB (95% interval from −0.004369 to −0.003153). We selected a single candidate before scoring this set.

    A new average of model weights reduced prediction loss on all five sets. The original base model was an average of three training checkpoints. In the new average, we replaced the checkpoint at step 51,200 with weights obtained 128 updates later at a fixed learning rate. We measure loss in bits per byte of text (BPB). Lower values mean the model predicts the continuation more accurately.

    Across 512 PolEval sentences, the difference was −0.003610 BPB (95% interval from −0.004460 to −0.002753). Across six longer reviews it was −0.000973 (−0.001485 to −0.000245).

    In a separate experiment, we resumed training from the weights saved after 16 updates. The model predicted another 4,194,304 tokens from 1,024 different documents over 64 updates, using a 2,048-token window and a fresh optimizer state. Across 512 sentences, BPB fell from 0.861354 to 0.860167 (a difference of −0.001188, 95% interval from −0.001564 to −0.000807). Across the six reviews it fell from 0.774978 to 0.774663.

    DatasetBaseNew averageAfter 16After 80
    PolEval (512)0.8619380.8583280.8613540.860167
    PolEval (1,082)0.8607410.8592540.8604350.859753
    Reviews (6)0.7750720.7740990.7749780.774663
    Technical texts (98)0.7671930.7664900.7670550.766976
    Dialogue and explanation (4)0.9651190.9629010.9647110.964398

    Both approaches improved the scores on all five sets. The new weight average achieved the lowest BPB on each. We have used these sets to select models before.

    In a separate comparison on 1,082 publicly evaluated PolEval sentences, both models ran in FP16 on the same GPU. Base Bielik-11B-v2 scored 0.829046 BPB and Stanisław with the new weight average scored 0.859250. Bielik led by 0.030204 BPB (95% interval from 0.023043 to 0.037652). Each model received its own first token as context. The table reports Stanisław’s FP32 measurements.

  5. Can Stanisław recall a fact from 3,700 tokens earlier?12 pairs of Polish texts

    After 250 long-context training updates, Stanisław used a 4,096-token window and got both answers right in 8 of 12 pairs when the fact was near the question, and in 0 of 12 when it was far away. The two versions shared 78–124 tokens after the last change in the near condition and 3,751–3,782 in the far condition. With the same window, the base model scored 0 of 12 pairs at either distance.

    We swapped two pieces of information in otherwise identical notes, for example the agreed and rejected dates for an inspection. The question at the end stayed the same. A pair counted as correct only if Stanisław preferred the right word in both versions. We used 12 Polish documents and six kinds of facts.

    The distant change shifted the trained model’s preference in the expected direction for five of the six kinds of facts. The shift was too small for the model to switch reliably to the correct answer. The threshold set before the test was 9 of 12 pairs at each distance. Earlier test of retrieving a code from a text.

  6. What did a second Polish annealing run change?two runs of 128 updates

    The fixed learning rate gave lower BPB than the decreasing rate on all four datasets in the table. The current base outperformed both runs. The decreasing rate met none of the four criteria for a longer trial. The existing average of three checkpoints remains the project’s base model. Both Stanisław 3B runs started at step 51,200 with the same optimizer state and predicted exactly 134,217,728 tokens in the same order. Each ran for 128 updates with a context of 2,048 tokens. The first kept the learning rate (LR) at 0.00003. The second reduced it linearly from 0.00003 to 0.000003. The current base model is the average of the weights at steps 50,000, 51,200 and 51,450.

    DatasetBaseFixed LRFalling LR
    Reviews (6)0.7750720.7819980.783178
    PolEval (512)0.8619380.8705120.872642
    PolEval (1,082)0.8607410.8742450.875426
    Engineering (98)0.7671930.7772600.778224

    Across the six reviews, the decreasing rate raised BPB relative to the fixed rate by 0.001179 BPB (95% interval from +0.000841 to +0.001413). The differences at the two publications were +0.001131 BPB (Biblioteka UAM) and +0.001283 BPB (Przegląd Humanistyczny).

    On the 98 engineering texts, BPB with the decreasing rate was 0.011031 higher than the current base. The allowed increase was 0.001 BPB.

    The table reports bits per byte (BPB) of the original text. Lower values mean more accurate predictions. A fifth, diagnostic panel contained three forum discussions and a chapter on audio description. Across all five evaluation panels we found zero shared 13-token sequences with the new training stream. The six reviews came from two publications and had already been used in earlier experiments. The final confirmation set remains sealed. Progress of both runs.

  7. What does the training window change when the text stays the same?two runs of 16 updates

    After 16 updates, the full 4,096-token variant predicted the later part of the text less accurately on all 15 documents. Both runs started from the project’s selected base model and learned to predict the same 1,048,576 tokens from 256 documents in the same order. One saw each passage whole (4,096 tokens). The other saw two independent halves of 2,048 tokens.

    On 15 internal Polish documents, we scored the same 30,720 tokens at positions 2,049–4,096. The variant trained and evaluated at 4,096 scored 1.458523 bits per byte (BPB). The variant trained on two halves and evaluated with a 2,048-token sliding window scored 0.708867. The difference was +0.749657 BPB (95% confidence interval +0.686473 to +0.826607). The project’s main base scored 0.708735 BPB in its native 2,048-token window. The 4,096-token variant still lost the main comparison when each of the six sources was left out in turn. When both variants saw the full 4,096 tokens, training on whole passages gave the better result (1.458523 versus 1.727282 BPB).

    For the short-text tests, every model used the same 2,048-token window. The table shows BPB for 1,082 Polish PolEval texts and 98 engineering articles. Fewer bits per byte means more accurate predictions.

    WeightsPolEvalEngineering
    Base0.8607410.767193
    2 × 2,0480.8604350.767055
    4,0960.8611100.767376

    A second Polish-language test covered 512 different PolEval sentences. After 16 updates, the 2 × 2,048 variant lowered the loss from 0.86193838 to 0.86135424 BPB (difference −0.00058414, 95% confidence interval −0.00081498 to −0.00035505). It predicted 292 sentences more accurately and 220 less accurately. Both models scored the same 14,671 tokens across 75,704 bytes. None of the 512 sentences duplicated a text from the earlier set of 1,082 or shared a sequence of 13 consecutive tokens with the data for these 16 updates. This is a small gain on a development set the project had used before. The variant remains a research candidate.

    Six longer Polish reviews from outside PolEval. The texts came from six authors and two publications, totalling 143,062 bytes. We evaluated both models in FP32 with a 2,048-token window. After 16 updates, the 2 × 2,048 variant scored lower loss on all six reviews. Overall loss fell from 0.77507198 to 0.77497811 BPB (difference −0.00009387, 95% confidence interval −0.00016400 to −0.00006483). That is a gain of about 0.012% on a previously used sample in a single genre.

    The 4,096-token variant met the preset 1% limit on loss increases over the base on both short-text sets. The 2 × 2,048 variant scored slightly better than the base on both. In the memory test each new variant received the same 60 prompts. At gaps of about 768 and 2,304 tokens, both retrieved the code in 0 of 30 trials in each group. The selected base had the same scores in the earlier test, while the earlier 250-update pilot scored 28 of 30 and 29 of 30. We retain the selected base. This pair fell short of the preset criteria for a longer run. A separate experiment tested retrieving a code from a long text. We also tested position scaling without training.

    We archived both research variants after 16 updates on three machines. For each variant we read and compared all 184 weight tensors. Every copy matched its original export. The archived weights omit the optimizer state needed to resume the same training run exactly.

  8. Can rescaling token positions alone help the model read longer texts?same weights · no training

    On the same 15 texts, we divided every token position by two. This placed the entire 4,096-token window on the scale the base had learned in training at 2,048. On the second half of the texts, the loss was 0.837126 BPB. Simply extending to 4,096 gave 1.731293, and the native 2,048-token sliding window gave 0.708735.

    The difference from the native window was +0.128391 BPB (95% confidence interval +0.103085 to +0.158033). In the first half of the texts it rose by 17.45% (95% interval 14.55% to 20.76%). This setting missed both preset criteria. We tested one scaling factor with no training. The original paper also used fine-tuning. Chen et al., 2023.

    See also the two runs with training.

  9. Both training runs improved prediction after a supplied paragraph breaktwo runs of 12 updates

    Two copies of Stanisław started from the same weights at step 51,200. One kept the proportions of paragraph openings in the existing training list (the natural mix). The other saw equal numbers of openings with a dialogue dash and a capital letter (the balanced mix). We evaluated 14 works by four other authors. At each genuine paragraph break, the model received two newline characters from the text. We measured how well it predicted the next eight tokens after the supplied break and at positions within paragraphs. Fewer bits per token means better prediction.

    Weights2,560 breaks5,532 interiors
    Starting model12.805465.54016
    Natural mix9.086975.50978
    Balanced mix9.071045.50732

    Follow-up check on formatting. After closing the main comparison, we planned a further measurement using the same weights. At all 2,560 openings, Stanisław’s ordinary tokenizer encoded a blank line and a space identically. On these passages, training on the balanced mix reduced loss over the next eight tokens by 0.76% with ordinary tokenization and by about 29% when both newline characters were supplied as separate tokens. Both training runs more than halved the extra cost of preserving the blank line. After training on the balanced mix, that cost was still 3.30124 bits per token (95% interval from +3.25619 to +3.35143).

    WeightsOrdinary inputBlank-line cost
    Starting model5.81418+6.99128
    Natural mix5.77411+3.31286
    Balanced mix5.76980+3.30124

    Did balancing the mix give an extra benefit at paragraph breaks? We took the difference between the two runs at breaks and subtracted their difference within paragraphs. The result was −0.01348 bits per token, with a 95% interval from −0.03824 to +0.01509. The direction favoured the balanced mix for three of the four authors. The interval crossed zero, so this result fell short of our preset threshold for a further trial. We trained each mix once. A decision on a full second annealing run remains open.

    At openings with a dialogue dash, balancing reduced loss by 0.2820 bits per token against the natural mix, averaged over all eight tokens. At openings with a capital letter, first-token loss fell by 0.0287 bits. Mean loss rose by 0.1302 bits per token over the next seven and by 0.1103 over all eight.

    In separate checks on 1,082 short Polish texts from PolEval and 98 engineering articles, loss rose slightly within the preset 1% tolerance. These scores use bits per byte (BPB).

    WeightsPolEvalEngineering
    Starting model0.8814430.783039
    Natural mix0.8815890.783119
    Balanced mix0.8816360.783128

    The project’s main base remains the average of three weight checkpoints. It scored 0.860741 BPB on the same PolEval texts. We described both training lists in the earlier entry on preparing paragraph openings.

  10. What did the final evaluation show after 250 updates with a longer window?Tesla V100 · base and 8,192-token pilot

    We evaluated the base model and the model after the pilot on the same Tesla V100 in full precision (FP32). Both used a 2,048-token window on short texts and the validation mixture. For held-out papers we scored positions 2,049 to 8,192 at two window lengths. Fewer bits per byte (BPB) means more accurate predictions.

    SampleBaseAfter pilot
    1,082 short PolEval texts0.8607410.871430
    98 technical articles0.7671930.776610
    64 validation mixture windows0.5989350.604615
    11 papers, 2,048-token window2.6347812.744543
    11 papers, 8,192-token window5.1055442.850242

    In the primary comparison, the base model could see up to the last 2,048 tokens and the model after the pilot could see up to 8,192. On the later positions the score changed from 2.634781 to 2.850242 BPB. The relative change in loss was +8.18% (95% confidence interval from +6.03% to +9.96%), so the model after the pilot predicted the text less accurately. Holding the post-pilot weights fixed, increasing the window from 2,048 to 8,192 increased loss by 3.85% (95% confidence interval for the change from +1.98% to +5.49%).

    When both versions used an 8,192-token window, training reduced loss by 44.17% relative to the base model, which was trained at 2,048. An independent CPU check reproduced the scores and intervals using 5,000 paired resamples of the papers.

    The sample covers 11 of the required 64 papers. In 10 papers from one journal, the extracted PDF text was distorted, which limits what these results tell us about reading natural Polish. In a separate memory test, the model retrieved the code in 36, 22 and 14 of 40 trials at 2,048, 4,096 and 8,192 tokens respectively. The pre-pilot model remains our base for further work.

  11. Can the wording give away when to ask for a measurement?Z22 · data for teaching solver use

    Final circulating pressure (FCP). The earlier questions omitted the timing of the pressure reading. Interpreting it as a measurement before or after increasing the drilling fluid density gave different rounded results in 44 of 47 scenarios. The revised questions specify a reading at the initial fluid density, before the increase. We updated 188 of 228 FCP questions (47 of 57 groups). The other 1,812 examples in the full set remained byte-for-byte identical. We verified 94 numerical results by recalculation. The other 94 answers requested the correct missing measurement.

    In a blind test, independent model reviewers correctly solved all 20 cases per language (10 calculations and 10 requests for clarification). Every answer met all five content criteria. Each reviewer rated 7 exchanges natural and 13 acceptable. Both recommended the more precise term “circulating pressure” for the reading. In the revised subset, none of 38 rules based on wording beat the more frequent decision by over 5 percentage points. Previously, 4 rules had crossed that threshold in Polish and 0 in English. In the 10 inherited FCP groups, 3 still crossed it in Polish and 1 in English. On the whole set, 13 of 38 crossed it in each language. This was a test of the training data. Stanisław’s main model still awaits fine-tuning on the 16 tools (SFT16).

    The first of five revisions in the full 16-tool set. Of 2,000 questions, we replaced the 192 about water flow between a pipe and its outer sleeve. They now cover 48 new scenarios. The other 1,808 examples were identical, byte for byte. An independent calculation confirmed all 96 complete results and all 96 partial results with the correct request for a missing measurement. In a separate blind review, the model reviewers’ decisions and answers matched the references in all 20 cases in each language. They rated 8 Polish exchanges natural and 12 acceptable, compared with 12 natural and 8 acceptable in English.

    Across the full set, wording still gives clues about when to ask and when to calculate. In each language, 13 of 38 rules outperformed always choosing the more frequent decision by over 5 percentage points. In the previous version 15 rules crossed that threshold. None did so on the revised flow questions. The full set still needs work before Stanisław can be fine-tuned on it.

    Earlier test of water flow between a pipe and its outer sleeve. From 10 new scenarios we prepared 40 questions in each language. Independent model reviewers made all 40 decisions correctly in each version. They could always calculate the cross-sectional area (40/40). They also found the correct velocity in all 20/20 complete cases. In the other 20/20 they asked for the inlet flow rate because only the return flow had been measured. In each language they rated 24 exchanges natural and 16 stylistically acceptable. Their comments concerned the order of the information and the question. Each of 38 rules based on question wording predicted 20 of 40 decisions correctly. Replacing the numbers and A/B labels with common placeholders left five different question wordings and two answer wordings per language. This test assessed the reference data for one tool.

    Drilling-fluid composition and the density needed to balance pressure. In a new sample, one independent model reviewer per language decided when the information was sufficient to calculate and when to ask for clarification. Across all 160 cases, the decisions, calculations and partial answers possible with missing data agreed with the reference answers. Of 80 Polish exchanges, the reviewer rated 36 natural and 44 acceptable. The English counts were 22 and 58.

    For the Polish questions about measuring fluid composition with a retort, a rule using only adjacent words predicted 40 of 40 decisions. Four of 38 rules beat the majority-choice baseline by more than the preset five percentage points. In the other three groups, none of the 38 crossed that threshold. These checks assess training data for tool use.

    In a separate trial with 40 new Polish retort questions, the original clue and each of the other 38 rules predicted 20 of 40 decisions, matching the majority-choice baseline. An independent model reviewer rated 36 reference answers correct and four incomplete. Those four gave two correct numbers, but the wording implied that one could tell which share was oil and which was water. The question did not provide that information.

    We kept the same 40 questions from 10 scenarios. The 20 answers to questions with complete data stayed the same. We revised the 20 answers requiring clarification to spell out both possible assignments of the figures to oil and water. A new model reviewer rated 40 of 40 answers complete. It rated eight natural and 32 acceptable, noting repeated phrasing in the conditional answers.

    In the original pilot with 2,000 examples covering 16 tools, we checked how to tell when a question could be answered by calculation and when it lacked a measurement. A dash in an empty field was enough to predict 605 of 788 decisions in each language. That was 19.54 percentage points better than choosing the more frequent decision. In the main sample, reviewers rated 6 of 200 Polish and 18 of 100 English question–answer pairs as unnatural. The full set failed the review.

    For two pressure calculations (Barlow and FCP), we wrote 20 new scenarios and 80 questions per language. Before seeing the reference answers, the model reviewer for each language correctly solved all 40 numerical problems and identified the missing quantity in all 40 clarification cases. Each of 38 rules based on surface features of the questions predicted 50% of the decisions correctly.

    After seeing the reference answers, the reviewers judged all 80 answers in each language technically correct. In each language, 24 exchanges sounded natural, 56 were acceptable and none sounded unnatural. The requests for clarification could suggest that the missing document or measurement was available. One independent model session reviewed each language for these 20 scenarios, without a human reviewer. Stanisław has neither been fine-tuned nor tested on these questions.

  12. Does a longer window help predict the later part of a document?18 internal validation documents

    After 250 updates, Stanisław recovered most of the accuracy it had lost when we first opened the 8,192-token window. We scored predictions at positions 2,049–8,192 in 18 documents from six sources. The model could see either up to the last 2,048 tokens or the text from the start of the document. Fewer bits per byte (BPB) means more accurate predictions.

    Window in tokensBaseAfter pilot
    Sliding 2,0480.7260930.729246
    Full 8,1922.3386220.728192

    With an 8,192-token window the new model scored 0.002099 BPB higher than the base model at 2,048. The 95% confidence interval from −0.003094 to +0.006948 allows for either an improvement or a decline. With the new weights alone, increasing the window changed the score by −0.001054 BPB (−0.005769 to +0.002489). A benefit from the longer context remains unconfirmed.

    All 18 documents entered the comparison, including the 15 that met the readability criteria. A separate, earlier training run had already used 29.81% of the positions scored here. The separate evaluation on held-out publications still has 11 of the required 64 papers.

  13. Can Stanisław find a code in a long text?base model and model after 250 updates

    After 250 updates, the model retrieved the code only near the question in this 8,192-token test. In a separate check we used 15 Polish documents from our internal validation set and assigned two new codes to each. We placed each code in the same text once near the start (10% of the way through) and once near the end (90%). There was no end-of-document marker between the insertion and the question. With a gap of 7,329 tokens the model retrieved the code in 0 of 30 trials. At 815 tokens it succeeded in 30 of 30. It retrieved both codes correctly near the question in all 15 works. This measures recall of five digits in these texts.

    How far from the question can the model retrieve a code in a 4,096-token window? We placed two new codes in each of 15 continuous Polish texts from six sources. We tested each code at six distances from the question. The table shows approximate distances and correct answers out of 30 trials.

    Gap in tokensBaseAfter pilot
    7680/3028/30
    1,2800/3028/30
    1,7920/3029/30
    2,3040/3029/30
    2,8160/3028/30
    3,3280/3028/30

    We chose a gap of about 2,304 tokens as the main comparison before testing (actual range 2,276–2,326). The model retrieved 29 of 30 codes after the pilot. The base retrieved 0 of 30. The gain was 96.7 percentage points (95% confidence interval 90 to 100 points, p = 0.0000610 in the document-level test). Both models received the question at the end of the full 4,096-token input, beyond the base model’s native 2,048-token window. Our original 40 trials at this length used different texts and code positions.

    Does the extra text help predict the next token? We used the original text of the same 15 documents and scored 30,720 tokens at positions 2,049–4,096. With the weights held fixed after the pilot, extending the window from 2,048 to 4,096 lowered the loss from 0.710593 to 0.703371 bits per byte (difference −0.007223, 95% confidence interval −0.020895 to −0.000221). The base model scored 0.708735 with its native 2,048-token sliding window. The comparison with that base was inconclusive (difference −0.005364, 95% interval −0.018983 to +0.002241). Leaving out the two Wikivoyage documents gave the base a small lead. We also compared two window lengths during training.

    Does the order of the opening passages help predict the ending? In 15 previously used Polish texts, we swapped the first two blocks of 512 tokens, leaving the 2,049 tokens before the scored ending unchanged. The model after 250 updates predicted the last 1,024 tokens of each text with a 4,096-token window. Loss was 0.695306 BPB in the original order and 0.695078 after the swap (difference −0.000228, 95% confidence interval −0.000719 to +0.000263). The original order scored better on 6 texts and the swap on 9. This test was inconclusive about the value of keeping the distant blocks in order. With a 2,048-token window both blocks were out of reach, and all 15,360 losses for the endings were bit-for-bit identical.

    During training, the model could see at least 7,329 earlier tokens from the same document for 4,645,875 of the 130,997,145 content tokens it predicted (3.55%). Such history was available in 5,849 of 16,000 training windows. How often a prediction needed it is a separate question.

    We also compared both models on the same 120 inputs from the original series. Each contained one five-digit code at one of five positions and a question at the end. The model had eight tokens to answer. The base model had been trained on sequences of up to 2,048 tokens. Its scores at 4,096 and 8,192 therefore test extrapolation beyond that length. The preset threshold was 38 correct answers out of 40 at each length.

    TokensBaseAfter pilot
    2,04833/4036/40
    4,0960/4022/40
    8,1920/4014/40

    At 2,048 tokens the model after the pilot gained four correct answers and lost one previous success. At 8,192 tokens the model retrieved the code in 0 of 16 trials when it appeared 10% or 30% of the way through the text, and in 8 of 8 trials when it appeared at 90%, close to the question. In seven of those 16 failures, there was no end-of-document marker between the code and the question. Five of the eight successes near the question did have such a marker. Across all 120 inputs we verified that the target code did not already occur in the background text.

  14. How does preceding text affect the PolEval score?three input conditions

    We grouped the same 1,082 Polish texts into 541 pairs. Each condition scored the same 27,959 predictions over 146,505 bytes. We varied only what the model could see before the text being scored. EOS marks the end of a document. In the third condition, 8 to 64 tokens from the other text in the pair came before the marker (median 23).

    Before the textBaseAfter pilot
    Nothing0.8607410.871430
    EOS only0.8587070.866992
    Part of another text and EOS0.8585990.864033

    The base model needed fewer bits per byte (BPB) under all three conditions. Adding the passage and EOS narrowed its lead from 0.010689 to 0.005434 BPB, a 49.2% reduction. The gap shrank by 0.005255 BPB (95% confidence interval 0.004080 to 0.006361). The first row remains the standard PolEval result. Establishing why the score worsened after training requires a separate experiment.

  15. How readable were the papers in the long-context test?source quality check

    The extracted text was severely distorted in 10 of the 11 papers held out for the 8,192-token test. All ten came from one journal. The median share of uppercase letters among all characters was 73.08%. The median number of normalized bytes per predicted token was 1.324 across those papers.

    For two other, publicly available papers from the same journal, we compared the image of the second page with the text layer of that same PDF page. Optical character recognition (OCR) found about 3–4% uppercase letters and 28 and 33 occurrences, respectively, of words from a fixed Polish list. In the text layer, 65–67% of characters were uppercase and the same word list yielded zero matches on either page. A simple alphabet shift still left the text distorted.

    Both models receive the same 11 papers in the original order, so their BPB scores are comparable on this material. The quality of the extracted text limits what we can conclude about predicting long passages of natural Polish. On a separate sample of 1,082 short PolEval texts, the base model scored 0.860741 BPB and the model after the pilot scored 0.871430 BPB.

    None of the long texts used to train the model in this pilot was attributed to that journal. We found no complete, identical copies of its 73 known articles in the blocks reused for training. A separate, earlier annealing run had included all 73. We also examined another source of texts and the reasons for earlier exclusions.

  16. How did we check further texts for the 8,192-token test?selecting independent texts

    Of 111 items from one newly reviewed journal, 42 articles passed the topic filter. At most 38 could be selected without repeating an author. Adding a paper required permission to use its specific full-text file, sufficient length and readable text. None had all three confirmed. This review added 0 new papers to the test.

    For two Open AGH textbooks, Mechanika i Termodynamika (Mechanics and Thermodynamics) and Geologia. Ziemia i procesy egzogeniczne (geology and Earth’s surface processes), the only match in the validation data was the licence URL. After we omitted 14 shared token sequences from that URL, matches remained in 92 and 83 passages, respectively, in the data from the final stage of training. Neither textbook entered the independent test set.

    Separately, we revisited 11 previously excluded dissertations. For each one, we checked the first document from the final stage of training that triggered its exclusion. These first matches contained only numerical strings in 10 cases and a bibliographic reference in one. Two methods confirmed the length of the longest identical passage in each pair. These lengths ranged from 14 to 73 tokens. For example, the same numbers in two tables can produce such a match. This check covered only the first documents flagged. Whether other passages or a complete dissertation appeared in the training data remains undetermined. All 11 dissertations remain excluded.

    The original 8,192-token evaluation used a separate group of 11 papers out of the required 64. In 10 of them, the text extracted from the PDF was severely distorted.

  17. Where did Stanisław lose the most ground on short texts?1,082 PolEval texts

    After 250 updates with an 8,192-token window, the average loss per token rose most on the first four predictions in the PolEval texts. The model makes its first prediction after seeing the first token. The increase per token was smaller at positions 5–16, but that range contained more predictions (11,955 versus 4,328). It accounted for 43.21% of the total deterioration on PolEval.

    We also checked how often the model saw the start of a document during training. EOS is the end-of-document marker. A window starts wherever the model begins reading a passage, which can be in the middle of a document. Of 16,000 sampled windows, only 7 began with the first token after EOS. Within the windows, the model predicted the first token after EOS 74,848 times. In 99.79% of those cases, it could see at least 17 preceding positions, so it could also draw on text from before the marker.

    Establishing whether the way the model sees the start of a text caused the decline requires comparing training runs that differ only in that condition.

  18. First training pilot with an 8,192-token window250 updates completed

    We completed a pilot on eight Blackwell GPUs with a context window four times as long as in pretraining. Across 250 weight updates, Stanisław predicted the next token at 131,072,000 positions.

    We evaluated both versions of the model on the same Blackwell GPU using the same 1,082 short Polish texts from PolEval. After training, the model needed more bits on average to encode a byte of text. The score rose from 0.860741 to 0.871430 BPB, a 1.24% deterioration. Predictions improved on 340 of the 1,082 texts. The difference across the sample was +0.010689 BPB, with a paired 95% confidence interval from +0.009404 to +0.011975 BPB.

    Before evaluation we set a limit of 1% for an increase in BPB on short texts. The pilot exceeded that limit, so we are keeping the previous base model. A separate evaluation covered later passages in 11 papers, taking account of distortion in their extracted text.

  19. What happens when Stanisław sees four times as much text?measured before further training

    We gave the model the same 11 Polish engineering papers twice. In the first run, each prediction could use up to 2,048 preceding tokens. In the second, it could use up to 8,192. The weights were identical. We measured the bits needed to encode one byte of the predicted text (BPB). A lower score means the model predicts the text more accurately.

    On the first 2,048 positions, both runs scored 3.087094 BPB. On positions 2,049 through 8,192, the wider window gave a worse score on all 11 papers. The overall score for those positions rose from 2.634781 to 5.105544 BPB. We found distorted text in 10 of these papers, which limits what the scores can tell us about natural Polish.

  20. How did the base model score before training?three baseline measurements

    Before extending the context, we evaluated the starting weights on a Tesla V100 with a 2,048-token window. We measured 0.860741 BPB on 1,082 PolEval texts, 0.767193 BPB on 98 Polish technical articles and 0.598935 BPB on 64 windows from an earlier validation mixture. We also evaluated the updated weights on the same GPU using the same passages.

Work of 19 Nov

  1. How fast does Stanisław process text?training and generating a reply

    On a single RTX PRO 6000 Blackwell, the 3B model completed 12 training steps with a sequence length of 8,192 tokens. Following the initial step, the next 11 processed 90,112 positions in about 13.38 seconds, an average of 6,734 tokens/s. Peak observed GPU memory use was 48.64 GiB. During training we know the whole example, so we can compute predictions for many positions in one pass. At each position the model can only see the text so far. This run measures computational cost. We assess how well the model uses long texts in a separate evaluation.

    In a single conversation, Stanisław generates one token at a time. With the same 3B weights and the same 32-token input, a 32 GB Tesla V100 generated 57.15 tokens/s and an RTX PRO 6000 Blackwell generated 141.97 tokens/s (2.48×). After a 512-token input, the rates were 57.19 tokens/s and 141.89 tokens/s respectively (2.48×). Each value is the median of three runs of 128 further tokens on a warmed-up model in FP16. Once the decoder was ready, time from tokenized input to the first output token was 19.8 and 60.2 ms on the V100 and 10.5 and 12.9 ms on Blackwell. Both GPUs selected exactly the same output tokens at both input lengths.

    We also ran four full requests through the tool-enabled model on each GPU. The model from step 57,000 produced identical text on both GPUs in all four cases. The first request after loading the model took 6.14 s on the V100 and 22.75 s on Blackwell. The next three took a total of 17.79 s and 8.40 s respectively. Blackwell answered 2.12 times faster across those three warmed-up requests.

  2. Can we resume training with an 8,192-token window?an eight-GPU trial

    After 30 updates on eight Blackwell GPUs, we saved 36.54 GB of weights and AdamW optimizer state. Eight new processes restored that checkpoint and completed another 10 updates. Across the eight GPUs, each update processed 524,288 text positions.

    It took 17 minutes 30 seconds from the last update until the file was opened, mostly to gather optimizer state from all eight GPUs. Writing the file itself took 19 seconds. At the final checkpoint after 40 updates the corresponding times were 17 minutes 35 seconds and 19 seconds. We reused the same pool of texts in this trial to measure cost and test the restart. We are also preparing to evaluate how well the model reads long documents. We measured its baseline at the existing 2,048-token window on 11 publications. A subsequent readability check found distorted text in 10 of them. The full evaluation calls for 64.

  3. Does the 3B base know when to call a solver?four tasks before fine-tuning

    We tested the selected 3B base and the final step-57,000 checkpoint on the same GPU and the same four questions. Given both the flow rate and the pipe diameter, the selected base asked for more information. When the diameter really was missing, it called a tool for pipe materials. Both models chose the correct action on 0 of 4 questions. Given the correct inputs, the hydraulics programs independently returned both reference results. These four cases give us a concrete comparison to repeat after training the model to use its tools.

  4. When should the model ask for a measurement?reviewing the fine-tuning questions

    Across 58 scenarios we wrote paired questions using the same words and numbers. Changing which pipe a measurement belonged to could mean that the diameter needed for the calculation was missing. Each of 14 simple rules based on the wording picked the correct action in 116 of 232 cases in each language, exactly half. An independent model reviewer rated 18 of 200 Polish questions (9%) and 5 of 100 English questions (5%) as unnatural. Some flow-velocity questions needed to specify the cross section. All 155 numerical answers agreed with an independent calculation to within rounding. Our threshold was fewer than 5% unnatural questions in each language. We sent the questions back for revision before fine-tuning.

    In the next version we revised 24 questions in each language. For example, we specified the cross section at which the flow velocity was to be determined. An independent model reviewer rated all 48 revised questions as natural. It rated each question in the full sample of 200 Polish and 100 English questions as natural or acceptable. Both versions covered the same 58 scenarios. Of the question–answer pairs, 150 in Polish and 41 in English were identical to pairs from the previous review.

    In a separate trial we prepared 20 new drilling-fluid scenarios and 80 questions in each language. An independent model reviewer solved each task before seeing the answer written for fine-tuning. In both languages it confirmed all 40 numerical results and all 40 decisions to ask for clarification. 60 of 80 reference answers in each language were complete. In 20 cases the answer correctly asked which reading belonged to oil and which to water. The combined liquid fraction was already known, so the solids fraction could also be reported immediately. The reference answers omitted that value. After revision, all 40 corrected answers, 20 per language, also gave the correct solids fraction. The reviewer checked the same scenarios again. A separate review on 20 November covered the full set for 16 tools and new questions for two of them.

  5. Short paragraphs now reach the training loaderfrom source text to the 3B trainer

    On November 20 we prepared two lists for a test of paragraph openings in Polish prose. Each covers the same 40 works by 12 authors, with 1,074 genuine paragraph openings and 1,074 positions within paragraphs. On the first list, 262 paragraphs start with a dialogue dash and 762 with a capital letter. These proportions come from the WL02 training set, which already oversampled rare characters. The second list has 512 openings of each type. Each list also includes 50 openings with other characters. The token budgets match, and 1,898 of the 2,148 positions contain identical passages. A second run reproduced both lists byte for byte, and an independent check confirmed their contents. After preparing the lists, we evaluated the two trained models.

    We recovered all 50 short textbook openings dropped by the old filter. For each opening we verified the original text and the passage that followed it. New training files can preserve short paragraphs, subheadings and indentation. In 24 test documents the training loader reproduced the original text exactly, including first paragraphs of 199, 200 and 201 characters. The new encoding also preserved all 32,882 line breaks in 98 engineering articles. Both encodings produced identical tokens on all 1,082 single-line PolEval texts.

    We also tested whether Stanisław could decide where to start a paragraph. The first trained modification generated 19 blank lines across six prompts. It also inserted breaks where the author had continued a paragraph, and it predicted the following words less accurately. A second version preserved every word across 16 paired runs but introduced no paragraph breaks.

    In a larger test we supplied the paragraph break and asked the model to predict the next eight tokens. We trained the modification on prose by 12 authors. Across 2,560 genuine breaks in 14 works by four other authors, the cost fell from 5.679 to 5.638 bits per token. All four authors saw an average improvement. In the 1,332 cases where a sentence ended and the next paragraph started with a capital letter, the cost rose from 5.824 to 5.868. In a separate test on 96 engineering articles, the result changed from 5.149 to 5.160 and the interval for the difference included zero. We also grouped the results by the opening character. The modification helped on the 799 paragraphs beginning with a dialogue dash and hurt on the 1,697 beginning with a capital letter. Most of the change came from the very first token. The modification remains experimental. This test measures paragraph openings in bits per token. We evaluate general Polish separately in bits per byte.

  6. Did a different mix of texts improve Polish prediction?two runs of 128 updates

    Starting from two copies of the same weights, we trained each on 8,388,608 target tokens. Only the last two of the model’s 26 blocks could change. One copy saw the previous balance of genres. The other saw more literature and educational text, among other changes. We also reproduced the starting model’s loss exactly on every one of the 1,180 evaluation texts on both GPUs.

    On 1,082 familiar PolEval texts, the starting score was 0.860741 BPB. The original mix scored 0.860688 and the changed mix 0.860802. The 95% intervals for both differences from the starting model included zero. On 98 engineering articles, the respective scores were 0.767193, 0.767109 and 0.767097. Neither run met the criterion for improved Polish prediction set before evaluation. We kept the three-checkpoint average for further testing.

  7. How many new texts passed the independence checks?contemporary Polish prose

    We wanted a separate test on complete paragraphs. After checking the text, permissions and printed layout, 27 works from two institutions remained. In 17 we found at least one sequence of 13 tokens that also occurred in the training data. Such a sequence can be a common phrase. Under the rule set in advance, we excluded every work with a match.

    After accounting for shared authors, nine independent works remained. Eight passages were at least 768 tokens long. The test required at least fifteen independent works and at least three from each of two institutions. We had seven from one and two from the other. We closed this test after checking the data, before scoring the model.

  8. What happened to paragraphs during 3B training?two corpus copies

    We checked how three readers wrote the same text to the training files. All three preserved the words of the first paragraph after two leading line breaks. In an article, a blank line between paragraphs became a space and a short subheading kept all its words. The textbook reader wrote each long paragraph as a separate segment with its own end marker. It dropped the subheading because it discarded standalone blocks of up to 200 characters. In 50 of the 53 files that passed the historical Polish-character filter, a short first block was dropped and later text survived. Across these files, the length filter removed 7.55% of characters in nonempty blocks, including traces of page layout and text extraction. A list of headings fixed before counting identified 20 section labels and 31 contents, list or bibliography labels among the dropped blocks.

    A model reviewer found eight useful headings or definitions among all 50 dropped openings. It classified none of the openings as prose. We separately sampled the complete pool of dropped characters, including passages from the middle of the books. The first reviewer estimated that 10.7% were intelligible Polish prose, about 253,000 characters. The 95% sampling interval ranged from 182,000 to 328,000 characters. A second model independently reviewed 98 passages. The two models agreed on whether each passage was prose in 93 cases.

    We also counted all 55.32 billion positions in the main training file and 5.33 billion in the annealing data. Both contained zero newline or tab tokens. The 1,082 historical PolEval texts and a separate sample of 512 sentences contained no line breaks. The tokenizer reproduced every byte of both samples. All 98 engineering texts contained blank lines. Their BPB uses the original byte counts.

  9. Polish grammar and multiple-choice tasks after the BPB improvementtwo language tests

    The three-checkpoint average selected the correct sentence in 99.36% of 3,272 Polish MultiBLiMP pairs. It scored −0.1645 across the ten polish_mc tasks, normalised relative to their majority-answer baselines. The original step 57,000 scored 99.17% and −0.1408 respectively. The separate 250-update pilot scored 99.21% and −0.1410. All runs used zero in-prompt examples. Improved text prediction came with different outcomes across language skills.

  10. On which sentences did the earlier Stanisław trail Bielik most?same hardware and text

    We grouped 512 familiar PolEval sentences by length. On 247 sentences of up to 128 bytes, the earlier two-checkpoint Stanisław average scored 0.02779 BPB higher than base Bielik-11B-v2. On 265 longer sentences, the gap rose to 0.07085 BPB. On 185 sentences where each model received exactly the same starting bytes in its first token, Bielik led by 0.07501 BPB. This gives us a reason to test longer Polish prose separately.

  11. Why did Stanisław struggle when it saw the start of a sentence?512 Polish sentences

    An end-of-text marker separated documents during pretraining. When we supplied the model’s beginning-of-text marker during evaluation, its predictions worsened across the sentence. We changed how the model reads the first position. It still receives its usual beginning-of-text marker, but reads it using the separator vector it learned during training. We kept all model weights.

    On a previously studied sample of 512 PolEval sentences, including prediction of the first token of each sentence, the score improved from 2.020294 to 0.930031 bits per byte. Every sentence improved. When the first token was already given, both versions scored exactly 0.861936 BPB. At 144 genuine document endings, the probability of stopping was identical. In an earlier trial we changed a vector shared by the model’s input and output. The mean probability of ending a document then fell from 30.31% to 23.19%, so we rejected that version.

    We repeated the test on the same 512 sentences in FP16 on the Tesla V100 previously used to evaluate the base Bielik-11B-v2 model. When predicting from the first token, the corrected Stanisław scored 0.93009 BPB and Bielik 0.88322 BPB. Stanisław predicted 184 of the 512 sentences better. Bielik led by 0.04687 BPB overall, with a 95% confidence interval of 0.03885 to 0.05483. When both models received the first token as context, they scored 0.86193 and 0.81284 BPB respectively. Bielik’s prior exposure to these sentences is unknown.

  12. Does adjusting prediction confidence suffice?1,082 PolEval texts

    We fitted one scaling factor for the entire model on 709 documents and checked it on 176 others from the same publication. On a familiar general Polish sample, BPB changed from 0.860741 to 0.860673. The 95% interval for the difference ran from −0.000172 to +0.000034, which is compatible with no improvement. We kept the original scale for subsequent experiments.

  13. What did Stanisław 3B gain from 250 more steps on Polish text?step 51,450

    Two runs shared the step 51,200 checkpoint. The original run ended at step 57,000. In a separate experiment, A, we returned to the same checkpoint and ran 250 updates on a broad selection of Polish texts. On 512 PolEval sentences selected in advance, A scored 0.864985 bits per byte. Its starting checkpoint scored 0.884919, and the earlier average of steps 50,000 and 51,200 scored 0.870933. Lower scores mean better text prediction. A met the criterion set for this sample before evaluation.

    We then averaged three sets of weights in equal proportions, adding A to the two earlier checkpoints. On two datasets already used repeatedly in our research, this average scored 0.860741 BPB on 1,082 PolEval texts and 0.767193 BPB on 98 engineering texts. The original step 57,000 scored 0.9013 and 0.9431 on those same texts. A alone scored worse on engineering texts than the earlier two-checkpoint average (0.776597 versus 0.768355). The improvement on the separate 512-sentence sample warrants further testing of this branch. Results on the two familiar datasets need confirmation on new texts.

  14. How did three earlier models perform on reviews from two more journals?six authors

    We compared predictions on six book reviews from the journals Biblioteka (Adam Mickiewicz University) and Przegląd Humanistyczny (143,062 bytes). With the first token of each review supplied as context, base Bielik 11B scored 0.686819 BPB, the earlier two-checkpoint Stanisław 3B average scored 0.776746, and Stanisław 1B scored 0.805559. All six reviews showed the same ordering. This was a separate comparison of the earlier models. We will report results for A and the three-checkpoint average on these reviews after independent verification.

  15. The final pretraining step for Stanisław 3Bcompleted

    On 19 November the base model, with 3.045 billion parameters, completed all 57,000 pretraining steps. Its final validation measurement during training was 0.7761 bits per byte, compared with 0.7590 at step 56,000. Each measurement used 20 randomly sampled batches of text.

  16. How well do the final weights predict Polish text?bits per byte

    On 1,082 general Polish texts from PolEval, Stanisław 3B scored 0.9013 BPB, the earlier Stanisław 1B scored 0.9293, base Bielik 11B scored 0.8296, and Bielik 11B Instruct scored 0.9402. Fewer bits per byte means the model predicted the text better.

    On 98 engineering texts, Stanisław 3B scored 0.9431 BPB, compared with 0.7226 for Stanisław 1B, 0.6162 for base Bielik and 0.6795 for Bielik Instruct. The earlier Stanisław model scored better on 84 of the 98 documents.

    We evaluated each model on the same source bytes. We used the historical filter for 13-token sequences found in the 1B training corpus. The PolEval texts had zero detected overlap and the engineering texts had less than 10%. Stanisław used a 2,048-token evaluation window and Bielik used 4,096 tokens. Bielik’s prior exposure to these texts is unknown.

    On a separate sample of its own validation mix, Stanisław scored 0.7067 BPB over 512 windows and 4,671,592 bytes of decoded text. For the same predictions, the trainer’s fixed conversion factor gives 0.7844 BPB.

  17. What changed between steps 51,200 and 57,000?the same two corpora

    The earlier Stanisław 3B checkpoint predicted both sets of texts better. On the 98 engineering documents the score worsened from 0.7831 to 0.9431 BPB, and on the 1,082 PolEval records it worsened from 0.8815 to 0.9013. The earlier weights did better on 80 of the 98 engineering texts and on 679 of the 1,082 PolEval records.

    The interval included 100 updates with the previous settings and 5,700 on a different training mix with a decreasing learning rate. The measurement captures their combined effect. Both checkpoints have been preserved.

    Identical windows from the validation mix showed the same direction. Using the actual number of decoded bytes, the model scored 0.6718 BPB at step 51,200 and 0.7067 BPB at step 57,000.

  18. Averaging the weights from before annealingone trial on both corpora

    Before the measurement, we chose to average the two sets of weights from steps 50,000 and 51,200 of the same run, with equal weight for each. This separate 3B model scored 0.8674 BPB on PolEval and 0.7684 BPB on engineering texts. Compared with the stronger checkpoint at step 51,200, it improved on all 98 engineering articles and on 811 of the 1,082 PolEval records.

    On this general Polish corpus it outperformed Stanisław 1B and Bielik Instruct. Both Bielik variants and Stanisław 1B still lead on the engineering corpus.

    On a separate set of 512 Polish sentences reserved for comparing variants, the averaged weights scored 0.87093 BPB. The step 51,200 checkpoint scored 0.88492 and Stanisław 1B scored 0.90902. The improvement over step 51,200 was 0.01399 BPB (95% confidence interval 0.01216–0.01581). After checking for overlap with training, all remaining engineering articles came from one journal. The splitting rule reserved that entire journal for a separate final test, so this trial could assess the improvement in general Polish.

  19. What does Stanisław read during the Polish-language training trial?108 passages

    We reconstructed the text selection for all 250 steps. Of the 262 million tokens the model was trained to predict, 77.94% come from encyclopaedia entries, debates and legal texts. Literature accounts for 10.47%.

    Two AI reviewers independently read 108 randomly sampled passages with source names hidden, 12 from each of nine genres. They identified the same eight passages as containing an exchange between speakers. Weighting the genres by their share of training gives an estimated dialogue share of about 4%. Both reviewers estimated that lists predominate in 29.6% of passages. Their estimates of visible text defects differed more substantially (16.9% and 31.9%). The effect of this text selection on model responses requires a separate evaluation.

  20. How well do the models predict Polish book reviews?six reviews from 2026

    We scored six reviews by five writers from a single publication, totalling 52,986 bytes of text. Given the first token of each review as context, averaged Stanisław 3B scored 0.70922 BPB, Stanisław 1B scored 0.74148, and base Bielik 11B scored 0.62850. The 3B model predicted the text better than 1B on all six reviews. Bielik outperformed both.

    When each model was given its own beginning-of-document token and also had to predict the first token, the scores were 0.76023, 0.75132, and 0.62899 BPB respectively. Both comparisons used the original byte count. Stanisław’s tokenizer normalised some characters and spaces, shortening the decoded text by 78 bytes.

  21. How far is Stanisław 3B from base Bielik 11B?the same 512 sentences

    Both models saw the same 75,704 bytes of Polish text, on the same GPU at the same precision. When each sentence’s first token provided context for the remaining tokens, the averaged Stanisław scored 0.87093 BPB and base Bielik-11B-v2 scored 0.81284. Bielik led by 0.05809 BPB (95% confidence interval 0.04953–0.06662) and predicted 381 of the 512 sentences better. Bielik’s prior exposure to these sentences is unknown.

    We also gave each model its native beginning-of-text marker and scored the first token of each sentence as well. Stanisław scored 2.18267 BPB and Bielik 0.88322. For Stanisław, about 91% of the increase in loss came from the rest of the sentence.

    During pretraining, an end-of-text marker (EOS) separated Stanisław’s documents. When we supplied that marker as context before the sentence, Stanisław scored 0.94057 BPB including the first token. On the remaining tokens, the difference from using no marker was only +0.00146 BPB (95% interval −0.00137 to +0.00422).

  22. What did the separate final test show?Stanisław 1B and the step 51,200 checkpoint

    On a further 512 sentences sealed during model selection, the step 51,200 checkpoint scored 0.90727 BPB and our 1B model scored 0.92754. On seven articles from a single journal, 3B scored 2.95788 BPB and 1B scored 1.92008. A check after scoring identified a major text extraction problem. Unusual control characters made up 20.54% of all characters in the articles. The scores describe those particular files.

  23. Did a lower learning rate help?four short trials

    Starting from the same checkpoint, we trained for 32 updates on either the broad corpus or the mix used at the end of training. For each corpus, the two runs saw the same text in the same order and differed only in learning rate. A tenfold reduction improved PolEval from 0.9076 to 0.8802 BPB on the broad corpus and from 0.9133 to 0.8826 on the annealing mix. It also improved scores on the 98 engineering articles for both corpora.

    Each update used one sixteenth of the tokens in a full training update. Among the 3B variants we tested, the averaged weights still scored best on these two sets of texts.

  24. The base model’s first recorded response to its creator19 November, 12:00 CET

    The model’s creator sent it the following message after pretraining. The original Polish prompt and the complete response are reproduced verbatim.

    Creator’s message
    stanislaw, stworzylem Twoje wagi, to Twoja pierwsza odpowiedz.

    Model response
    1. 100000000000000000000000000000000000000000000000000000000000

    The base model had learned to predict the next token in a text. At the time of this exchange, the final weights had yet to undergo supervised fine-tuning (SFT) on examples of instructions and responses. At each step the model chose the most likely token. Generation reached the limit of 64 new tokens. The recorded text is 63 characters long, including 59 consecutive zeros.

  25. How Stanisław answered a question about springselected response
    Stanisław on the world · 19 November 2026

    Po czym poznajesz, że nadchodzi wiosna?

    Wiosna to czas, kiedy wszystko budzi się do życia. Wiosną kwitną kwiaty, a drzewa i krzewy zaczynają się zielenić.

    English translation: “How can you tell that spring is coming?” — “Spring is a time when everything comes to life.” “In spring, flowers bloom and the trees and shrubs begin to turn green.”

    After pretraining, we gave the base model six questions we had written in advance, each separately and only once. We selected an excerpt from its answer about spring.

    These are the first two sentences in the order the model generated them. It started each list item with a hyphen. It went on to mention birds, insects and the first leaves. Generation stopped at the limit of 64 new tokens.

  26. Can Stanisław pick the correct Polish verb form?two sentence-pair tests

    We gave both models pairs of sentences differing in the form of a verb. A model scored a point when it assigned a higher probability to the complete grammatical sentence. On the first set, Stanisław 3B scored 232 of 400 and the earlier 1B model scored 245. On the second, they scored 544 and 535 of 576 respectively. After excluding four pairs designated in advance, the scores were 540 and 531 of 572.

    The primary test in the second set concerned sentences where a noun between the subject and the verb could suggest the wrong verb number. In the group chosen in advance, the 3B model scored 102 of 128 and the 1B model scored 95. Confidence intervals for the differences in the primary comparisons on both sets included zero. These tests measure specific grammatical constructions.

  27. The Polish tests previously used to compare Stanisław with Bieliktwo different measures

    MultiBLiMP asks which of two sentences the model considers more likely. Across 3,272 pairs, final Stanisław 3B achieved 99.17% accuracy, Stanisław 1B achieved 98.35%, and Bielik 11B Instruct achieved 98.90%.

    On ten multiple-choice tasks with no examples in the prompt, the mean score normalised against majority baselines was −0.1408 for Stanisław 3B, −0.1389 for 1B and +0.5548 for Bielik Instruct. On this scale zero corresponds to baseline performance.

    The averaged 3B weights scored 99.24% on sentence pairs and −0.1630 on the multiple-choice tasks. Compared with final 3B weights, sentence-pair accuracy rose slightly and the multiple-choice score fell.

    Across 494 Polish reviews from PoLEMo2-out, we checked which of four sentiment labels the model actually chose. With no examples in the prompt, it labelled 473 reviews neutral, although only one was labelled neutral in the answer key. It got 10 answers right. After seeing four examples from the training split, it got 36 right and still labelled 408 reviews neutral. Both runs used the same averaged weights.

  28. First tool-selection trial after pretrainingfour open tasks

    We connected the final base model to the program that runs the solvers. Two tasks required a calculation, one called for a question about a missing input, and one called for an ordinary sentence. In this run the model chose the appropriate action in 0 of 4 cases. Three tool messages had valid syntax. Both reference calls returned the correct numerical results.

    When generating text after the decision, the program repeated the same character in all four cases. We repeated the test at 16-bit and 32-bit precision and with the CUDA graph disabled. Each run reproduced the four decisions and the repeated character. All scores checked before token selection were finite.

Work of 18 Nov

  1. Well names gave away when to ask a follow-up questiondataset version rejected

    The questions were meant to test whether all the inputs needed for a calculation were present. In the main group of questions, counting how many values carried the name of the well in question was enough to tell when to calculate and when to ask for more information. The rule also worked on questions set aside for evaluation. We rejected this version of the dataset before the next round of fine-tuning.

  2. Word choice still gave away the decision in the revised questionspilot dataset rejected before fine-tuning

    Repeating the well name after every number sounded unnatural, especially in questions about a single well. That evening we tested the revised dataset. The open trial contained 2000 questions, of which 760 in each language qualified for comparison. A simple classifier used only the presence of words to predict when to calculate and when to ask for more information. As a baseline, we chose the more common decision for the same tool and the same number of quantities. The classifier beat that baseline by 40.4 percentage points in Polish and 41.2 in English. We had set a limit of 5 points, so we rejected the pilot dataset before fine-tuning the model.

  3. How we will assess the 3B model’s Polish after pretrainingevaluation planned

    We will compare how well the 3B and 1B models predict what comes next in the same general and technical texts. Separately, we will check whether they choose a verb that agrees in number with its subject when another noun comes between them. We will report the results of this test separately for the earlier set of 400 sentence pairs and the new set of 576 pairs. We will also compare the same sentence structures with the intervening phrase removed. The new set still awaits linguistic review by a human reader.

Work of 17 Nov

  1. 3B context window: plan up to 32 thousand tokensplan, starts after pretraining ends

    The 3B model is trained on a window of 2048 tokens. On intermediate weights we measured that beyond this window it reads clearly worse: bits per byte rise from 0.71 at positions 1–2 thousand to 1.32 at positions 7–8 thousand. After pretraining ends we will extend the window in stages to 8, 16 and 32 thousand tokens, saving the weights after each stage. Fine-tuning will use the longest window that passes tests written down before the measurement: a gain in the new range, no deterioration in short context, and finding a piece of information inserted into a long text. The 32 thousand window is needed, among other things, so that the model sees the descriptions of all tools at once, about 21 thousand tokens. An independent review confirmed on real weights that extending the window alone does not change the results at the first 2048 positions, bit for bit. Data are the limit: long Polish texts other than legal acts and parliamentary transcripts are scarce, so the 32 thousand stage will be decided by counting the documents.

  2. Fixes to the program around the model: numbers and unitsdone, to be measured at the next fine-tuning

    The program that lets the model copy into a call only numbers from the question received three fixes without any change to the weights. A number with a thousands gap written with a non-breaking character is now one number. With exponent notation it is no longer possible to copy the mantissa alone. Unit spellings with spaces, for example “kg / m3”, and poises are recognised. Nothing changes on the training data, and in the units benchmark 354 questions change. Without the model we know only the reach: of 1620 tasks in Polish 28 become correct for certain, and the upper bound is 105. An independent review found two errors in the first version (an ordinary space glued separate numbers together, and some exponent numbers were lost) and the corrected version went into the program. We do not compare benchmark results from before the fixes with new ones; at the next fine-tuning both models will be measured with the same program. A second batch of fixes, including word spellings of compound units and treating markers typed into the question text as ordinary text, passed review and will go in once the new data are built.

  3. Evaluating the base after pretraining: tools ready, one set to improveready for 19 Nov

    The tools for evaluating the model right after pretraining passed an independent review. Bits per byte reproduce the 1B model's result on the clean Polish test (0.929314) with a difference only at the ninth decimal place. The new set of 400 sentence pairs, which checks subject and verb agreement with a misleading insertion, fares worse. The set came off the ceiling (1B: 245 of 400, in the old set 333 of 334), but it was built from eight templates and behaves like eight observations: within single templates 1B scores from 4 to 49 hits out of 50, and the same sentences without the insertion are resolved correctly by both tested models in 95.5%. So we wrote down the rules for reporting the result before measuring the final weights: the result per template, with controls, without a conclusion from the number 400 alone. A second version of the set with 48 templates already exists; it awaits review and reading by a human.

  4. Conversation in Polish: first trials with a teachertrial, negative result

    The model should also simply converse in Polish, and we have no conversation data of our own. We are checking whether conversations for fine-tuning can be written by a larger open Polish model in the role of a teacher: Bielik 11B v3.1 Instruct (Apache 2.0 licence according to the model card), which writes first the user's questions, then the answers. The teacher is not a source of drilling knowledge. The first trial on one card ended with all 96 planned conversations rejected already at the question stage: the teacher did not keep the required format, and from abstract topics it wrote sentences about the topic instead of requests. In the second trial, with the instruction written in prose and with concrete situations, the questions sounded natural, but in 11 of 96 the teacher confused the roles and wrote an answer instead of a question. An earlier trial of answers alone gave 20 of 48 truncated and 11 with lists despite the ban. No conversation went into training. Conclusion: strict gates are needed, filtering out topics in which the teacher states unverifiable facts, and reading by a human before every larger batch.

  5. Crossings that cannot be built: an error instead of a resultfixed in the registry, data to be replaced

    While analysing the drop on old tests it turned out that the geometry engine for directional crossings returns a result that looks correct for data that cannot be built. When the entry and exit arcs do not fit within the crossing length, it cuts the horizontal section to zero and confirms the bending radius. Example: angles 30° and 6°, depth 23 m, length 250 m, while the arcs alone take up 524.7 m horizontally. The design application the engine comes from warns about this on screen; the layer through which the model calls the engine had no such warning. In the training data this affected 6629 of 14,431 questions about a crossing (45.9%), so the model was being taught to give a result for crossings that cannot be built. The tool registry now reports such a case as an error and states how much room the arcs take. Of 9227 distinct calls in the data 4539 get the error, and 4688 buildable ones give exactly the same result as before. The unbuildable examples disappear from the data of the next fine-tuning, and new data are meant to teach the model to answer that such a crossing cannot be built.

Work of 16 Nov

  1. Fine-tuning SFT15: resultdone, recipe not accepted

    The fifth fine-tuning of the same intermediate 3B weights combined the SFT14 data with the pilot data rewritten into pairs: the same question once with complete data, once with a gap. All criteria written down before the measurement were met. On the public part of the units benchmark the model solves 811 of 1620 tasks in Polish (50.1%) against 522 (32.2%) after the pilot, that is 17.8 percentage points more (interval 14.6–21.1), and with field correction after the answer 1168 (72.1%). On the pilot test it chooses the right tool in 774 questions out of 802 (after the pilot 795, after SFT14 322). It tells questions with complete data from questions with a gap much better than before (a difference of 78.1 against 7.3 percentage points). Even so, by our own specification the recipe was not accepted, because two regression gates on old tests were triggered: 179 instead of 188 correct out of 200 and 175 instead of 200. The English part of the benchmark also collapsed: in English the model almost always asks a follow-up question (1 correct task out of 300 in the basic family, after the pilot 118). This is a fine-tuning of intermediate weights, not an evaluation of the finished 3B.

  2. Where the drop on old tests comes fromdone

    Both drops come from one old tool, the geometry of a directional crossing; the other four old tools score 100% in both tests. The test questions there use a terse notation in which the length stands without a label, and such notation was absent from every one of the 14,431 training examples of this tool. The model after SFT15 then swaps depth and length. Our first guess, that the old data had been diluted by the new, was not confirmed. Conclusion for the next data: terse questions with unlabelled quantities and with several quantities of the same dimension.

  3. Twin questions written in prose: measurementdone, with a caveat

    On four sets of 300 new questions each we checked whether the model tells a complete question from a nearly identical question with a missing datum. The model after SFT15 correctly asks a follow-up in 286 cases out of 300 (after the pilot 0, after SFT14 116) and correctly calls the tool in 291 (254 and 106). Both answers in a pair are correct in 282 pairs out of 300 (0 and 59). Caveat: in this test merely counting the numbers in the question lets one guess the right decision in every case, so the result does not prove that the model reads which quantity is missing. The next data are meant to separate the two.

  4. Breakdown of errors on the units benchmarkdone

    Of 1620 tasks in Polish the model after SFT15 fails 809. The largest error classes: a number written into a field with a different unit (418 cases, and after field correction 30), a follow-up question despite complete data (257, of which 231 in eight tools), a number the program did not allow to be copied because of a thousands gap (55), the wrong tool (35). With the program of that time the model could solve at most 1543 of 1620 tasks; the fixes of 17 Nov removed this limit.

  5. Hours and days in the tool registrydone

    Time fields used to accept only seconds, so questions had to say “drilling takes 43,200 s”. The registry now accepts minutes, hours and days, rates per hour and per day, speeds in metres per minute and per hour and in feet: 85 new fields in 17 tools. The model still copies the number literally and chooses the field with the unit from the question, and the registry does the conversion. All earlier calls give the same results.

  6. New engineering question data: version rejected in reviewnot accepted, the next one is being built

    A separate work track prepared data with questions written the way an engineer writes: tersely, with unlabelled quantities and with extra numbers that are not needed for the calculation. The data passed the technical checks, but the independent review did not accept them. Every question requiring a follow-up contained an extra quantity from auxiliary installations, so the model could recognise a follow-up by it rather than by the missing datum. In reading, 65.8% of the questions were judged unnatural. The next version is to have questions without extras, with one and with several, and probes checking that the decision cannot be guessed from surface features.

  7. Correction: bits per bytemeasure corrected

    Our bits per byte measure divides by the bytes of the source text, and the tokenizer collapses whitespace, so on texts with many gaps the result comes out slightly too good. For the 1B model on industry texts it is 0.7226 against 0.7298 when converted to bytes of the normalised text; on the clean Polish test there is no difference (0.9293). The numbers published on this page so far are computed on source bytes, and from the 3B evaluation on we report both denominators. This matters for comparisons with other models.

Work of 15 Nov

  1. Fine-tuning SFT13: regression and its causedone, negative result

    The third fine-tuning, with new tool data instead of the pilot data, went badly: on the pilot test the model solved 122 tasks out of 802, and after the pilot 791. We found the cause in the data. Whether the model should call a tool or ask about a missing datum was decided, in every one of the 26,285 examples, by the number of quantities in the question. The model learned to count quantities instead of checking which one is missing. Since then, before every fine-tuning we check whether the right decision can be guessed from surface features of the question, and we also measure the model on its own data distribution. We also corrected the entry of 14 Nov: the data had 29,885 examples, and 115 were removed, not 90.

  2. Fine-tuning SFT14: shortcut removed, variety missingdone, partial repair

    The same data, after removing the dependence between the number of quantities and the decision, gave a model that no longer guesses from the number of quantities: it solves questions containing only the required data in 298 cases out of 298, and it tells complete from incomplete with a difference of 40.3 percentage points (after the pilot 7.3). It still loses to the pilot on the pilot's own test (the right tool in 322 questions against 795 out of 802) and on the public part of the units benchmark (27.8% against 32.2% of tasks in Polish). The data knew only 126 templates of sentences with data, so the model could not cope with other wordings. Hence the composition of the next fine-tuning: these data together with the pilot data.

  3. Software around the modelin progress, first packages reviewed

    A second separate work track is building software thanks to which the model no longer works only inside its own program. An interface compatible with the commonly used standard for talking to models has been built, so Stanisław can be connected to ordinary programs and measured with the same harness as other models. The solvers are also available in the MCP standard, 25 of them for now. In preparation are a loop of multiple calls with effort levels, multi-turn conversation, work with documents, resistance to instructions injected into content, and a back end for blind evaluation by the Faculty's researchers. Every package goes through an independent review with the tests repeated; the first two were accepted with remarks.

Work of 14 Nov

  1. Units benchmark: first measurementdone, public part

    We measured three models on the public part of the new benchmark: 3896 questions in Polish and in English, in nine families, with results checked by the solver. The expectations were written down before the measurement. We tested correcting the field after the model's answer: when a number from the question went into a field with a different unit, the program moves it to the field whose unit matches the question. On questions with a changed unit and with mixed unit systems, the 3B model after the pilot went from 22.9% to 55.7% of tasks solved, and the model after the second fine-tuning from 5.9% to 37.2%. The correction removed about 90% of unit errors and broke no answer in the other families. The guard built into the decoder again did worse.

  2. What the benchmark said about the model itselfconclusion

    On new questions the model does much worse than on the pilot test. In the whole Polish part, 3B after the pilot solves 31.6% of tasks, and 46.1% with field correction; the 1B model 12.7% and 16.8% respectively. The most common error is an unnecessary follow-up question: the model asks for data that is in the question, especially when the question starts with the intent and the data come later. The 98.9% from the pilot was measured on questions built from the same intent sentences as the training data, so it measured familiarity with templates more than the task itself. The benchmark has 108 new intent sentences and also uses units that were absent from the training data. This is the public part; the final result will come from the hidden part.

  3. Fine-tuning on new data (SFT13)in progress

    The third fine-tuning of the same intermediate 3B weights started on the evening of 14 Nov. Only the tool data change: instead of the pilot's 12,500 examples there are 29,885 examples with more than 800 intent sentences and the full variety of units. Before the start we removed 115 examples that had the same numbers as benchmark tasks: 90 from the public part and 25 from the hidden part, compared through hashes, without opening that part. The criteria for comparison with the pilot were written down before the result: tasks with a call, pairs of easily confused commands and follow-up questions, plus regression gates on older tests.

Work of 13 Nov

  1. Unit guard in the decoder: measurementdone, result below expectations

    After the overnight result we checked whether the unit error can be removed without new fine-tuning. The guard lets a number go only into a field whose unit stands next to that number in the question. The expectations were written down before the measurement: success from 90%, failure below 50%. On 360 questions with units from outside the training data, the model after the second fine-tuning went from 20.8% to 42.5%, which by our own criteria is a failure. The guard removed all cases of a number written into a field with a different unit (337 → 0) and cut the number of results wrong by an order of magnitude fivefold (130 → 26), and it broke nothing for the model after the pilot. The construction failed: the model writes the field name first and the number second, so the guard does not undo a wrong field, it only substitutes another number from the question. The next step is correcting the field instead of blocking the number, checked on new questions.

  2. Benchmark of tool calls with units: specificationwritten before the measurement

    We are turning the overnight result into a measuring instrument. The benchmark checks whether the model picks the right solver, writes numbers into fields with the right units, asks for missing data, refuses when there is no tool, and reports data outside the range of a method. Correctness is judged by the solver, not by another language model. The question families cover a change of unit, an unfamiliar unit notation, mixed unit systems, superfluous quantities and pairs of easily confused commands, in Polish and in English. The specification with the measures and the analysis method was written down before the first result existed. The question generators are being built in a separate work track.

  3. Experiment: solver traces in pretrainingplan, starts after a decision

    We want to check whether a model that has already seen executed solver calls in pretraining learns tools faster and copes better with new ones than a model that first saw them in fine-tuning. Six variants of the 1B model differ only in the share of such traces (from zero to about 3%) and in the moment they are given. Whoever trains from scratch knows the whole corpus and can settle this directly. The result will decide the data composition of the 7B model.

  4. Context of the 7B modelplan adopted on 12 Nov

    The 7B model will be trained from scratch, because it gets a new tokenizer and a different architecture. The context window is set by training: 4096 tokens for most of the run, 8192 at the end, then in steps of 16, 32 and 64 thousand on long documents. After each step we save the weights and run the same tests, so measurements will decide whether to stay at 64 thousand or go back to 32 thousand. On the 1B model we saw that beyond the length used in training the model stops working, and extending it afterwards costs some quality on short tasks.

  5. Where we stand compared with otherssurvey

    We reviewed models trained from scratch by small teams, work on models with tools, and applications in petroleum and drilling engineering. Polish models trained from scratch already exist, and in general knowledge a small model will not catch up with large ones, so we do not compete there. What we did not find is a benchmark of engineering calculations judged by executing a solver, or a measurement of unit errors when filling in tool fields. That is where we focus: the model is not to guess numbers and is to know when it does not know.

Work of 12 Nov and the night of 12/13 Nov

  1. SFT11 pilot on the 1B model: resultsdone

    The model learned 25 new commands. On 802 questions that were not in the training data, it picks the right tool in 96.0% of cases, and the solver called with its arguments gives the correct result in 94.8% (0% before the pilot). All calls are well-formed. When an input is missing, it asks the right clarifying question in 86.3% of cases. The old tools did not suffer (for example 98.2% → 99.4% correct results), and the model answers identity questions correctly 13 times out of 14. Weak spots: commands that are easy to confuse (correct result in 9 of 36 questions) and work with documents, where the model refuses more often, also needlessly (unnecessary refusals 7.3% → 12.9%).

  2. Where the pilot's errors come fromdone

    A breakdown of all answers showed that the model confuses the intent of the question, not the numbers. With the right tool chosen, the arguments were correct in 588 cases out of 588, and all 32 tool-choice errors in the main test sit in 4 of 75 intent sentences. Hence the requirements for the next data: pairs of questions about neighboring commands with the same inputs, surplus quantities in the question, and more ways of asking the same question.

  3. SFT11 pilot on intermediate 3B weights: resultsdone on 13 Nov

    The same recipe fine-tuned 3B weights from step 9200 of the ongoing pretraining (16% of the run) on four Tesla V100 GPUs: 4000 steps in 4 h 56 min, with not a single step skipped because of numerical errors in fp16. On 802 questions about the new tools the 3B model solves the task in 98.6% of cases (1B: 94.3%), gives a correct solver result in 98.9% (1B: 94.8%), and correctly asks for missing data in 96.1% (1B: 86.3%). In pairs of easily confused commands it picks the right one in 36 cases out of 36 (1B: 25) and gives a correct result in 26 (1B: 9). There are losses too. On three of the four sets of old tools 3B is worse by 4–8 percentage points; the errors are in the arguments, not in the choice of tool. In work with documents it refuses more often, also needlessly (unnecessary refusals 12.9% → 16.0%), with the same ability to tell questions with an answer from those without one, so this difference can be set with a threshold. This is a check of the recipe on intermediate weights, not an evaluation of the finished 3B.

  4. Acceptance review of new solver and data packagesdone

    The packages prepared in a separate work track passed an independent acceptance review: repeated tests (168 tests of the main engine, 33 and 55 tests of two new solvers, 30 adapter tests, 48 tests of the wellbore design sheet, 31 tests of the bilingual data), sha256 hashes matching the handover record, and a reproducible build, meaning binaries rebuilt from the same sources are byte-for-byte identical. The candidate for the new data (12,500 training examples) passed all format and leakage checks.

  5. Two new solvers in a separate registry versiondone, the model does not know them yet

    The second version of the registry gained: the first cycle of the volumetric well-control method and a check of a valve pressure test against an excerpt of an industry standard, whose result is a status with a list of violations, not a number. The registry now has 149 tools, and the 147 existing ones work through the new version bit-for-bit the same (235 calls compared). The decoder gained boolean values, and decimal numbers are passed exactly, because rounding the last digit could change the assessment against the standard's threshold. The model will learn these tools once data for them exist.

  6. Language review of the training datadone

    All texts the model is to learn in the next fine-tuning (13,415 records, 481 patterns after masking the numbers) went through a review of terminology and Polish: przestrzeń pierścieniowa (annulus) instead of the colloquial “pierścień”, gęstość cyrkulacyjna ekwiwalentna (ECD), próba wyłączenia (LOT), correct inflection and notation of units. 5261 records were corrected. Tool calls, solver results and numbers were left untouched, which is verified by the same checks as when the data are built.

  7. SFT12 fine-tuning on 3B: negative resultdone on 13 Nov, data not accepted

    The second fine-tuning started from the same weights and settings as the pilot and differed only in the data (a new set of 25 commands after the language review). The two models were compared question by question, by criteria written down before looking at the results. The new data came out worse: 96.6% against 98.6% on the test of the new set, 4 correct results against 14 out of 36 in the confusable pairs, and 56.4% against 98.6% on the pilot test. The cause is visible in the answers. The model picks the right tool, but writes a number given in metres into a field in millimetres, because the new data taught one unit notation per field. The solver then computes without an error on the wrong unit. The conclusion for the next data: the full variety of units has to stay in training. The pilot data remain the reference, and work with documents came out the same in both fine-tunings.

  8. The page in English and the bookdone

    The page has an English version, and the “Book” tab offers the guide “Stanisław. Polski model inżynierski w praktyce” (58 pages, in Polish) for download. While the book was being written, every figure was compared against the sources and several figures on the page were corrected, among them the size of the corpus after deduplication (about 161 billion tokens).

Work of 11 Nov

  1. A 147-tool registry and the model ↔ solver loopdone

    A single registry combines 5 tools that the 1B model already uses with 142 commands of the new solver engine written in Rust. The loop: question → call with numbers taken from the question → solver → result → answer. When an input is missing, the model asks a clarifying question; when the tool does not exist, it refuses.

  2. SFT11 fine-tuning pilot on the 1B modelfinished on 12 Nov, results above

    Started on the evening of 11 Nov on two Tesla V100 GPUs. It covers 25 commands from various fields, the most frequent ones in an engineer's work and in exams, in 12,500 examples, including ones with a clarifying question about missing inputs and with a refusal when the tool does not exist. Goal: the reflex of reaching for the solver instead of computing “in its head”. The pilot tests the recipe (format, mask, scoring) on a small model before it goes to 3B. Results in progress.

  3. Faster decoding and schema-constrained callsdone

    A key-value (KV) cache in decoding speeds up the full question → solver → answer loop by approx. 2.7–2.9× (two test sets), and the answer text is identical to that without it (30 of 30 questions in each set). A tool call is constrained by the schema from the registry: the model can only give a name from the registry, fields from the tool description and numbers present in the question.

  4. Refusal threshold from probabilitydone

    The “answer or refuse” decision is made at the first token after the question. A threshold on the refusal probability in a single model (SFT8) separates the cases as well as the later fine-tuned versions: AUC 0.918 versus 0.910–0.920 for SFT9, SFT10 and SFT10a (the confidence intervals of the differences include zero). The trade-off between correct and unnecessary refusals is therefore set by the threshold at inference time, without new fine-tuning runs. Answers forced by too high a threshold are sometimes fabricated, so for the assistant we recommend a threshold at which the model would rather refuse than guess.

  5. Evaluation on the Polish Belebele and INCLUDE testsstarting point

    The evaluation harness uses prompts consistent with the Open PL LLM Leaderboard, and the Bielik models serve as a reference for the method: on the base Bielik-11B-v2 model the harness reproduces the published results to within 1.2 percentage points. Stanisław 1B in the letter format (choice A–D) is at chance level: Belebele 23.3% against 25% for guessing. A signal shows up only where the answer text is scored (33.1%). This is the starting point before the 3B evaluation.

  6. Data for the bilingual 3B annealing variantready

    Alongside the Polish variant, a 70% PL + 30% EN variant was prepared: 3.86 billion Polish tokens and 1.65 billion English tokens, including English industry textbooks, decontaminated against the test sets. The variant is to start from the same pre-annealing checkpoint; both variants will be compared on the same tests.

  7. Preparing the next model (7B)plan

    A new Polish-English tokenizer that preserves newline characters, and with them paragraphs, lists and tables. The current tokenizer turns them into a space, so the 1B and 3B models have not seen them. Distributed training (FSDP2: weights, gradients and optimizer states sharded across GPUs, with activation checkpointing), because 7B does not fit in the current DDP scheme. The new trainer was checked on a small model; in deterministic mode, resuming from a checkpoint reproduces a continuous run bit for bit. The decision to start comes after the 3B evaluation.

Part I · Scope and assumptions

What is a measurement and what is an estimate

This document brings together two kinds of numbers. The values for 1B and 3B were measured on the zen5 server (8 × RTX PRO 6000 Blackwell 96 GB, PCIe without NVLink). The values for 5B, 7B, 9B and 11B are an estimate derived from a throughput rule fitted to these two measurements and from the scaling law. Every estimated number is marked in the text with the sign “~” or the word “estimate”.

Methodological caveat. The quality forecast comes from the Chinchilla scaling law (Hoffmann et al. 2022) in the form L = E + A/N0.34 + B/D0.28, fitted to English corpora. For Polish, and for a tokenizer with a different information density, it indicates the direction and order of magnitude; it is not a point forecast. The percentages in the table are the relative change in the reducible part of the loss (L − E), assuming D = 20N tokens, relative to the 1B model.
Measurement basis

Measured on zen5

Stanisław 1B · done
1.198 billion weights
22 layers, d = 2048. Pretraining on ~28 billion PL tokens in 41 h on 8 GPUs, ~23.7 thousand tok/s per GPU. Context extended to 8k: “needle in a haystack” test 97.5% at 4k and 8k, no regression at 2k.
Stanisław 3B · pretraining complete
3.045 billion weights
d = 3072, 26 layers, 24 heads, SwiGLU 8192, RoPE 500k, context 2048. Measured on 8 GPUs: ~77.6 thousand tok/s (~9.7 thousand per GPU; earlier estimate 66-68 thousand). Pretraining ran from 10 to 19 November. Validation bpb: 1.257 (step 1000) → 0.844 (step 6000).
Throughput rule
≈ 28 / N thousand tok/s per GPU
N in billions of parameters. The 1B and 3B measurements agree with it. For ≥ 5B, ~30% overhead was added for FSDP communication over PCIe (an estimate, not a measurement).
ZeRO-1 · test
34.8 vs 35.6 thousand tok/s
No throughput gain on 4 GPUs, but it saves memory. Relevant as an intermediate step before full FSDP.
Polish corpus
~161 billion unique tokens
After deduplication; fewer after decontamination against the test sets. This is a hard data limit for the whole scaling program.
Overview

Cost and expected gain by size

Forecast made on 14 November, before 3B pretraining ended. Tokens per the rule of ≈ 20 per parameter (Chinchilla). Time for 1B measured, for 3B from the rate measured during pretraining on 8 GPUs, for 5B-11B an estimate from the throughput rule with FSDP overhead. The “Reducible loss” column is the change in L − E relative to 1B.

ModelTokens (≈ 20/param.)Time on 8 GPUsL − E at D = 20NReducible loss vs 1BIn the current code?
1B28 billion41 h (done)0.821100%yes
3B60 billion~9 days (in training, rate measured)0.636−23%yes (82 GB/GPU)
5B100 billion~4 wk0.547−33%no - needs FSDP + activation checkpointing
7B140 billion~2.5 mo0.494−40%no
9B180 billion~4 mo0.457−44%no
11B220 billion~6 mo0.431−48%no

Training time versus reducible loss

Two panels with a shared row order and separate linear scales. Time bar lengths are expressed in days (for labels in weeks and months, 7 days and 30 days were assumed); the labels keep the values from the table. The right panel is the L − E value from the Chinchilla formula; lower is better.

training time on 8 GPUsreducible loss L − E

Reading: the loss curve flattens, while the time bars grow linearly with the number of parameters and tokens. Between 1B and 3B the 23% gain costs ~5× more time; between 3B and 7B the next 17 points cost ~7× more.

Forecast

What to expect

1B → 3B: the largest jump per unit of work

Knowledge tests (polish_mc, ARC) should rise above chance level. Hard refusals in RAG, where 1B got stuck at ~0.65, and multi-step reasoning should go up. Tool use is already at 0.96-1.00 on 1B, and there is not much to gain there.

The argument for 3B from the 1B measurements (11 Nov): four 1B fine-tuning runs (SFT9, SFT8, SFT10, SFT10a) lie on a single trade-off curve. The more often the model correctly refuses in hard cases (0.535 → 0.859), the more often it also refuses where the answer is in the documents (0.048 → 0.186). The differences concern the threshold, not the ability to discriminate: SFT10a rejects 107 answerable questions that SFT8 does not reject, and there is one the other way round. Discrimination needs more capacity or better data, not different proportions (details: Stage 9). The measurement from the evening of 11 Nov confirms this: a threshold on the refusal probability in SFT8 alone reproduces the other fine-tuning runs (AUC 0.918 versus 0.910–0.920).

3B → 7B: further improvement, but ~7× more expensive

The expected gain is less than half of the previous jump, at about seven times the time cost. This is the region where the time/gain balance starts losing to the barriers in the section below.

In fairness to Bielik 11B

Bielik 11B is Mistral further trained on Polish; it inherited knowledge from trillions of tokens of English pretraining. A model trained from scratch on ~161 billion Polish tokens will not catch up with it in general knowledge, even at 7-11B. The field of competition is the Polish language, terminology, the domain and behavior (tools, RAG).

Correction of 11 Nov. An earlier version of this page compared Stanisław only with the Instruct version of Bielik and showed an advantage of 1B on PolEval. The base Bielik-11B-v2, measured with the same method on 10 Nov, is clearly better than 1B at language modeling: by ~0.10 bpb on PolEval and ~0.07-0.11 bpb on the domain. It is the bar for 3B. The difference between the Bielik versions most likely comes from instruction tuning worsening bpb.
Test (clean subset)Stanisław 1BBielik 11B baseBielik 11B InstructReading
PolEval, bpb (lower = better)0.924 (8k) · 0.929 (2k)0.8300.940base Bielik better by ~0.10 bpb; Instruct slightly worse than 1B
Domain, bpb (lower = better)0.686 (8k) · 0.723 (2k)0.6160.679Bielik better in both versions
Terminology, 86 pairs (higher = better)0.907not measured0.8721B better than the Instruct version; interval ~±6-11 pp

“Clean” = documents with no 13-grams shared with Stanisław's data (PolEval n = 1082; domain: contamination below 10%). Cleanliness computed against Stanisław's data does not tell whether Bielik has seen these texts. Bielik computed on V100 in fp16, kod/ewal_czysty.py.

Barriers

Problems by scale

The order follows the increasing model size from which a given problem becomes binding.

  1. Data: barrier number oneevery scale

    ~161 billion unique Polish tokens (715 billion characters; measured on 11 Nov on held-out files of each source, earlier we gave ~175 billion). Up to 8B at 20 tokens per parameter this is enough; at 9B (180 billion) and 11B (220 billion) repetitions are necessary. Up to ~4 epochs there is almost no loss (Muennighoff et al. 2023); beyond that the gain from repetitions fades. More data means reaching for lower HPLT quality bins or other corpora, at the cost of quality.

  2. Memoryfrom 5B

    The current trainer keeps the full fp32 weights and the AdamW state on every GPU, i.e. 16 B per parameter: for 5B that is 80 GB before activations, at the limit of 96 GB. FSDP with full sharding and activation checkpointing is needed. Estimated effort: about 1 day of work plus tests.

  3. Training stabilityfrom 7B

    Loss spikes are expected. Remedies: QK-norm, z-loss, longer warmup, lower learning rate; GQA for cheaper inference. Every architecture change is to be introduced and tested on 1B first, and only then carried over to larger models.

  4. Disk and checkpointsfrom 5B

    16 B per parameter: 5B is 80 GB, 11B is 176 GB per checkpoint; when saving via a temporary file, temporarily ×2. Today the working disk has ~616 GB free, which for 11B limits the number of checkpoints kept to a few.

  5. Time on someone else's machinefrom 7B

    The server belongs to a friendly operator. A run longer than a month carries the risk of interruptions beyond our control. Resuming from a checkpoint is ready; the machine's availability calendar is a human matter, not a technical one.

  6. Inference on atari (Tesla V100)from 11B

    3B and 7B in fp16 fit on a single GPU. 11B in fp16 (22 GB) does too, but runs slower. NVFP4 quantization on ninfer (as in Superwiertnik) solves the size and speed problem.

Conclusion

Recommendation

Step 1
Evaluate the completed 3B base model on clean, uncontaminated tests, with the base Bielik as the bar. This is the only size that combines a large expected gain with ready code.
In parallel
Solvers and fine-tuning of 3B for the engineer's assistant: calculation catalog from textbooks, engine in Rust, fine-tuning data from the solver (section below). Fine-tuning of 3B only after the base training ends.
Step 2
If the 1B → 3B jump confirms the forecast: 5B (~4 wk), after deploying FSDP with activation checkpointing and QK-norm, tested earlier on 1B.
7B and up
Makes sense only with more compute or a different strategy (data, architecture, division of work). The limit is data and time, more than the model size itself.
Direction since 11 Nov

Calculations you can trace

Goal set on 11 Nov: Stanisław is to be first and foremost an engineer's assistant on a real wellbore design; exam problems are the second benchmark, and the model will be assessed by the Faculty's scientists. The principle: the deterministic solver does the calculation, the model takes its knowledge from documents, and what stays in the weights is the reflex of reaching for a tool, a feel for the order of magnitude of the result, and asking clarifying questions about missing data.

Initial tool set for 1B
5 tools
Hydrostatics, pressure loss in a pipe, rheology fitting, minimum curvature method, HDD trajectory geometry. Tool selection 1.000, correct result 0.96-1.00; weakest is the trajectory (five parameters).
Calculation catalog
295 calculations, 261 past the gate
Nine areas of deep drilling from 67 textbooks (incl. Bourgoyne et al. “Applied Drilling Engineering”, Mitchell and Miska, Nelson, IWCF, Szostak). Gate: a formula gets in when it reproduces a textbook example digit for digit. Plus 115 unit conversions and 76 field constants derived from definitions (status as of the evening of 11 Nov).
solver-gleb engine
142 commands
Rust, JSON in and out, Polish descriptions and units, gate tests on examples from the sources. Together with the 5 tools of the 1B model it forms a tool registry of 147 tools used by the model ↔ solver loop. Status as of the evening of 11 Nov, under construction.
Found along the way
dozens of discrepancies in examples
Some are calculation errors in the books themselves (e.g. multiplying by the buoyancy factor instead of dividing, an omitted trip in the drill bit cost), some are constants with typos and OCR errors; on top of that, IWCF rounding that decides the result. A solver checked against several sources can be more reliable than a single book.

Order: units and problems from Faculty tests → hydraulics, well control, pressures, pipes, drill string, cementing → wellbore design sheets (with a list of missing data and explicit assumptions) → fine-tuning data generator → SFT11 pilot on 1B and intermediate 3B weights (results from 13 Nov in the Research chapter) → fine-tuning later 3B versions. A separate track: tools described in the context, so that the model can also handle a tool it has not seen in training (modeled on MCP servers).

Research plan of 25 Nov 2026

Mantis: a fleet of micromodels with an orchestrator

We are testing whether a fleet of small models trained on rewards from deterministic solvers, directed by an orchestrator, can match a large general-purpose model on engineering design tasks. Such a system should be cheaper, reproducible and able to run without the cloud.

The proving ground is horizontal directional drilling (HDD). The result should show at which level of complexity a small specialist stops being enough. The name comes from the mantis shrimp, a small animal with the strongest strike in the ocean and the most complex eye in nature.

Starting point

The key finding: after solver fine-tuning, the 30M model scored 0.973 on the test set and refused more accurately than Qwen3.8-27B. We measured this on templates and paraphrases, however, not on questions written by people.

  • A small specialist is enough for a narrow task. The 30M model: 0.973 on the test set, 0.986 outside the training range, 0.946 on paraphrases, refusal 1.000, zero invalid JSON. Rules: 0.81. Qwen3.8-27B with tools: correct refusals 0.81 (sample of 300). On the tool registry, Stanisław 3B after fine-tuning gave matching arguments in 604 of 620 calls and untrained Bielik 11B in 57 of 620; the comparison is uneven, as Bielik saw this format for the first time.
  • Pretraining matters from the first million weights. The 1M model without pretraining: score 0.20 and 66 of 500 invalid JSON; with pretraining 0.77.
  • The model does not copy tables. The error of binding numbers by magnitude and position was removed by pointing to the source instead of copying, a deterministic parser and decoding that allows only numbers from the question.
  • Large pretraining from scratch does not pay off. On the blind drilling test, Bielik 11B with our LoRA scored 33 of 36, Stanisław 3B 17 of 36 and Stanisław 1B v4 9 to 10 of 36. The main Stanisław line has therefore moved to Bielik 11B v3 Base; Mantis is a parallel track.
  • The solver path is reproducible. In the original version (the Ask chapter), the calculation path gave 32 of 32 identical answers, while steps based on a language model changed the result for the same question.
  • An orchestrator is cheap to train; the labels are expensive. According to the authors, Conductor 7B needed 2 × H100 and 200 GRPO iterations, and TRINITY is a 0.6B model with a head of 10 to 20 thousand weights. Fugu (Sakana AI) takes its labels from calls to large closed models. A solver reward replaces exactly that part.

Hypotheses

Task set
D
An open Polish set of HDD tasks with solver-checked answers separates the models. Refuted if all models fall within one confidence interval or decisions can be predicted from vocabulary alone.
Micromodel
H1
A 30M model trained on the solver matches 27B on real questions in an almost new domain. Refuted by a gap to 27B outside the confidence interval on the held-out set.
Fleet
H2
A fleet with an orchestrator beats one large model at the same compute budget on quality, cost and reproducibility. Refuted if one large model is better or equal at levels 3 and 4.
Solver reward
H3
Reinforcement learning with a solver reward produces an orchestrator and a critic without an LLM judge. Refuted by no gain over fine-tuning alone or zero success at the start.

The HDD proving ground

Stanisław’s calculation catalogue was built from deep drilling textbooks and does not cover HDD. The 1B model knew only trajectory geometry from this domain. We therefore also measure how the recipe transfers to an almost new domain.

  • HDD solvers in three independent implementations: Rust, TypeScript and Haskell, with Rust and Haskell agreeing in 47 of 47 cases. We check agreement between implementations for every task.
  • Standards (ST-IGG-3301:2021, DCA) written as rules in code for compliance tasks.
  • Physical plausibility review by HDD specialists where the solver is silent, for example choosing a radius for the ground or the risk of drilling fluid breaking out to the surface.
  • Real crossing designs only for internal measurement, without publication and without training.
Level 1
1 calculation
One calculation from the question: Bingham pressure losses, pull-back force, bend radius. Check: the solver result within a tolerance.
Level 2
2 input
A complete solver input from a design description, with mixed units and gaps. Check: the solver gives the same result as on the reference input, gaps reported explicitly.
Level 3
3 chain
Trajectory, forces, hydraulics and breakout risk in sequence. Check: every link agrees with the oracle.
Level 4
4 critique
Find an error inserted into a design. Check: the list of inserted errors and the number of false alarms.

Each level is measured for the micromodel, Qwen3.8-27B and Bielik 11B with LoRA.

Fleet architecture

At first the orchestrator follows rules; later it learns from the solver reward. It divides the work among five specialists. No model gives a number from memory; every number comes from a tool call.

  • Micromodels of 30 to 125M trained on the solver: the extractor (solver input and honest gaps from a description), the planner (order of calculations), the standards checker (compliance with ST-IGG and DCA). They fit on a CPU and run offline.
  • LoRA on an open base (Bielik 11B, the same base as the main Stanisław line) where language matters: the critic looking for errors in a design and the editor writing the report in Polish terminology.
  • Deterministic tools: HDD solvers, standards rules in code, retrieval with a reranker that always cites its source.

Measurement method

  • Baselines first: rules, Qwen3.8-27B with tools, Bielik 11B with LoRA. Training only where a measurement shows a gap.
  • Splits by task family, not by record, and a 13-gram scan between the sets.
  • Predictability test: a simple classifier on vocabulary alone must not be able to guess the decision.
  • Three test sets: synthetic from the generator, questions written by people (researchers and students, the faculty exam) and real designs, internal only.
  • Blind judge pairs for text answers, order drawn from a hash, key revealed after scoring.
  • Reproducibility as a separate measure: each question several times at temperature 0.
  • Cost: tokens, time and energy per task on the same hardware. Every run with checksums of data and weights.

Stages

  1. M0, task set and oracles: generator for levels 1 and 2, solver agreement, first questions from people. Gate: the set is not predictable from vocabulary, the oracles agree.
  2. M1, baselines at levels 1 and 2. Gate: there is a gap to close, or a negative result is recorded.
  3. M2, micromodel (H1): the 30M recipe transferred to HDD, measured on the human set. Gate: H1 decided, first paper.
  4. M3, fleet (H2): levels 3 and 4, a rule-based orchestrator, comparison with one large model. Gate: second paper.
  5. M4, solver reward (H3): GRPO for the orchestrator and the critic. Gate: a gain over fine-tuning alone, third paper.

M0 and M1 run on V100 cards and can start right away. Reinforcement learning and LoRA go to Blackwell cards, and the university computing cluster joins for large runs. A negative result in M1 or M2 will be published as well.

Data boundaries

  • The public set contains synthetic tasks from our generators and questions from students, with their consent.
  • Standards and textbooks are used in training only under the research exception (Art. 26² of the Polish Copyright Act); their content is not published.
  • The HDD solver code is not published and models are not trained on it; it serves only as a measurement oracle.
  • Teacher models only under a licence that allows it (Qwen3.8-27B and Bielik 11B v2.3 under Apache-2.0).

Publications

  1. HDD task set and H1: the datasets and benchmarks track of a machine learning conference, and an industry journal.
  2. H2, fleet versus one large model: a conference or workshop on agent systems.
  3. H3, solver reward instead of an LLM judge: a machine learning conference.
  4. Engineering synthesis: an expert system grounded in deterministic truth, an engineering journal.

Each paper will also appear as a preprint and an entry on this site. Specific venues and dates will be chosen after the first H1 result.

Risks

  • Synthetic data easier than reality. That is why the set of questions written by people is built from the first stage.
  • Tasks predictable from vocabulary. A classifier test before every use of the set.
  • Oracle disagreement. Every disagreement between implementations is investigated before the task is used.
  • The micromodel loses already at level 2. The fleet then relies on LoRA, and the boundary up to which a small model is enough is a result in itself.
Part II · Reproduction guide

How Stanisław is built step by step

A guide for a person without an AI assistant. Each stage has a goal, input, the exact command from a script in the kod/ repository, output, time on our hardware, a way to check it, and known pitfalls. Sources: the scripts in the repo, docs/HANDOFF_2026-11-09.md, docs/HANDOFF_2026-11-10.md, docs/DANE_1B_research_2026-11-07.md and the project log on atari. Every number comes from the code or the log; whatever cannot be established from the sources is marked as to be completed instead of guessed.

deterministic: code only, no model requires a local teacher model (not an AI assistant) to be completed: missing from the code and the log
Flow

Stage diagram

Solid arrows are data dependencies (a stage's output is the next stage's input). The dashed line is the evaluation loop: the results of stage 10 decide the next SFT rounds and the SFT data. A gold frame marks a stage that, in the current recipe, uses a local teacher model.

Stages 1-11

Instructions

Path convention: on each of the three servers this is a separate project directory with owner-only permissions (chmod 700). All scripts assume they are run from this directory, with the code in the kod/ subdirectory. Every script ends with a marker in the log (e.g. TRENING_GOTOWY); checking means verifying the marker and the numbers in the statystyki.json or log.jsonl files.

1

Hardware and environment

time: configuration, not measured
Goal
Three machines with three roles: zen5 for pretraining and SFT (bf16), atari for evaluation, solvers, the RAG index and paraphrases (fp16), c64 for fine-tuning and evaluating the 3B model on Tesla V100 GPUs (fp16).
Hardware
  • zen5: 8 × RTX PRO 6000 Blackwell 96 GB, PCIe without NVLink. Project directory, venv in venv/, Python 3.14 (handoff of 10 Nov). Training in bf16 with torch.compile, DDP via torchrun. During the work GPUs 0, 1, 6, 7 were at times occupied by the machine's owner; the scripts specify the GPUs explicitly via CUDA_VISIBLE_DEVICES.
  • atari: 6 × Tesla V100-SXM2 32 GB with NVLink (sm_70), 2 × Xeon Gold 6248R (96 threads), 251 GB RAM, Ubuntu 24.04. Project directory. venv: torch 2.10.0+cu128, sentencepiece 0.2.3, pyarrow 26, lm-evaluation-harness 0.4.13, transformers 5.22.2 (log, 7-8 Nov). Training in fp16 with GradScaler. GPUs off-limits during the work: 0 (students' model), 2 (reranker), 3 (production 27B model).
  • c64: 8 × Tesla V100-SXM2 32 GB with NVLink (sm_70), 2 × Xeon Gold 6248R (96 threads), 251 GB RAM, Ubuntu 24.04. Project directory. venv: Python 3.12.3, torch 2.10.0+cu128, sentencepiece 0.2.3, pyarrow 26, lm-evaluation-harness 0.4.13, transformers 5.22.2 (read on 12 Nov). Training in fp16 with the FSDP trainer and ShardedGradScaler (kod/trener_fsdp_sft.py): fine-tuning 3B on four GPUs takes about 21 GB of memory per GPU at 4.2–4.5 s per step. The fine-tuning data and solver binaries are copies from atari; the script checks the data against the manifest (md5). The GPUs sit in pairs (0–1, 2–3, 4–5, 6–7), and the second GPU of each pair runs hotter.

To be completed: the venv package versions on zen5 (torch, CUDA) are not recorded in the repo or in the log; there is no requirements file.

Rules
  • Every heavy CPU job runs under systemd-run --user --scope -p MemoryMax=… and with a limited process pool (OOM lesson of 7 Nov, log).
  • tmux does not inherit the caller's environment variables: put the variables directly in the command (kod/start_zen5.sh:8-9).
  • Fixed env of every run: STAN_TOK (path to the tokenizer), CUDA_DEVICE_ORDER=PCI_BUS_ID, PYTORCH_ALLOC_CONF=expandable_segments:True.
  • On c64 at most four GPUs at a time and one job. Every other GPU (0, 2, 4, 6), one from each pair, brought under load one at a time every 120 s; 180 s of pause between jobs, and a start waits while any GPU is at 85°C or more (kod/sft12_3b_c64.sh, kod/c64_kolejka_sft12.sh; rule since 12 Nov).
Check
1M end-to-end smoke test (kod/smoke_1m.sh, GPU 4 on atari): pretraining 3000 steps × 32k tok ≈ 98 million tokens, ~450 thousand tok/s, ~4 min; val bpb 2.04 (step 500) → 1.60 (step 3000); fp16 stable (grad_norm ~0.4, zero NaN). Then SFT for 1500 steps and eval --n 500. Marker SMOKE_GOTOWY. If this test passes, the environment is in working order.
2

Acquiring the corpora

time: to be completed (depends on the link)
Goal
Collect raw Polish sources: web, PDFs, a curated corpus, the HPLT archive, domain articles and industry texts. Download directly on zen5 (a ~0.7 MB/s link makes transfer from atari impractical; log, 7 Nov).
Sources
DatasetSize / roleLicenseScript
HuggingFaceFW/fineweb-2, pol_Latn226 GB parquet; 152 million docs; web, baseODC-Bypobierz_fineweb2.sh
epfml/FineWeb2-HQ-Plus, pol_Latn42.1 GB; top 10% of FW-2 by the XLM-R classifierODC-Bypobierz_hf.sh → korpus/fw2hqplus_pol
HuggingFaceFW/finepdfs, pol_Latn79.7 GB; PDF: science, standards, engineeringODC-Bypobierz_hf.sh → korpus/finepdfs_pol
HuggingFaceFW/finepdfs-edu, pol_Latn16.9 GB; top 10% of FinePDFs; professional prose, annealingODC-Bypobierz_hf.sh → korpus/finepdfs_edu_pol
HPLT 3.0, pol_Latn, bins 9-10~94 GB jsonl.zst (406.6 GB in total); outside HFCC0 (wrapper)download: to be completed; conversion hplt_do_parquet.py
SlayerLab/polish-dynaword (without TED)8.9 GB; 17.1 billion characters; curatedper document (license column); TED has no license, skippedpobierz_dynaword.py
PL domain (journals)2340 articles, 55 million PL characters: Nafta-Gaz 1380, Wiertnictwo NG 372, Annales UMCS B 183, Prz. Geofiz. 169, PPGOS 117, Energetyka Rozpr. 79, AGH DOG 40CC BY / CC BY-SA per publisher; AGH and PPGOS have no CC in the metadata (decision: kept)collection script outside the repo: to be completed; format korpus/domena/*/*.jsonl
Industry texts210 PDF books + 59 OCR = 301 MB of text, 32 million PL characterscopyrighted; Art. 26² of the Polish Copyright Act (TDM for research, AGH, non-commercial); authorized persons only, not publishedrejestr.py → rejestr_zrodel.json
Commands
# zen5, project directory; resumable download (curl -C -), 4 threads (xargs -P 4)
bash kod/pobierz_fineweb2.sh                       # → korpus/fineweb2_pol/, marker FINEWEB2_GOTOWE
bash kod/pobierz_hf.sh <repo> <path in repo> <target> # generic; arguments used for HQ-Plus/FinePDFs/Edu: to be completed
STAN_ROOT=$PWD python3 kod/pobierz_dynaword.py > dziennik/pobierz.log 2>&1   # skips data/ted_pl*, marker DYNAWORD_GOTOWE
# HPLT: jsonl.zst → parquet (text, url, id), shards of 200,000 docs, 1 process per file; log dziennik/hplt_do_parquet.log
venv/bin/python kod/hplt_do_parquet.py             # → korpus/hplt3_pol_pq/, marker HPLT_PQ_GOTOWE

Domain collection rules (docs/DANE_1B_research): no circumventing of blocks (PAN/Incapsula only with the publisher's consent), a limit of ~1 request/s, a User-Agent with contact details.

Output
Directories korpus/fineweb2_pol, fw2hqplus_pol, finepdfs_pol, finepdfs_edu_pol, hplt3_pol_pq, dynaword/data/<source>/*.parquet, domena/*/*.jsonl (fields: jezyk, tekst, doi, url_pdf, tytul), branzowe/*/*. Total before deduplication: 1175 files (excluding industry texts); after deduplication the corpus takes 243 GB.
Check
GOTOWE markers in the logs; pobierz_dynaword.py writes _lista_plikow.json (path, size) and skips files whose size matches, so a rerun verifies completeness. Note: after deduplication (stage 4) the raw downloads of FW-2 (211 GB), HQ-Plus (40), FinePDFs (75) and HPLT (94) were deleted from zen5 with consent; to reproduce, they have to be downloaded again.
3

SentencePiece Unigram 32k tokenizer (v3)

time: to be completed
Goal
A Polish tokenizer with a 32,768-token vocabulary that keeps industry terms whole (ciśnienie, hydrostatyczne, wiertniczy, świder: pressure, hydrostatic, drilling, drill bit) and compresses better than general-purpose tokenizers.
Input
A sample of approx. 2 billion characters (CEL = 2_000_000_000, seed 20261108) from 10 sources by share: fw2_hqplus 0.30 · fw2_reszta 0.15 · finepdfs_edu 0.12 · finepdfs 0.08 · wikipedia 0.12 · biblioteka_nauki 0.08 · wolne_lektury 0.03 · eurlex 0.03 · parliamentary 0.02 · govpl 0.02. A document is included with probability 0.3; industry texts ×6 (diacritics filter > 0.004 = PL). The last file of each source is held out for the compression test (kod/tokenizer_v3.py:2-21).
Command
# zen5; the script takes no arguments, STAN_ROOT defaults to the project directory
venv/bin/python kod/tokenizer_v3.py              # marker TOKENIZER_V3_GOTOWY
# SentencePieceTrainer parameters (tokenizer_v3.py:52-55): model_type=unigram, vocab_size=32768,
# character_coverage=0.9999, byte_fallback, split_digits, input_sentence_size=30_000_000,
# num_threads=120, max_sentence_length=8192, pad/unk/bos/eos = 0/1/2/3, train_extremely_large_corpus
Special tokens
69 user symbols (user_defined_symbols): 13 structural (<pytanie> </pytanie> <odpowiedz> </odpowiedz> <kontekst> </kontekst> <zrodlo> </zrodlo> <wywolanie> </wywolanie> <wynik> </wynik> <odmowa>), 6 tool tokens (<f:hydrostatyka> <f:strata_rura> <f:mcm> <f:trajektoria_hdd> <f:reologia_fit> <f:brak_narzedzia>), 50 reserved <rez_00>…<rez_49>. EOS = 3 is the document separator in all .bin files.
Output
tokenizer/stanislaw_unigram32k_v3.model (+ .vocab, .meta.json, probka_v3.txt). The earlier versions v1/v2 (16,384, atari, tokenizer.py, tokenizer_v2.py) served the 1M-125M models; the file tokenizer/stanislaw.model is v2 (copy/rename step: missing from the code).
Check
Compression test on the held-out text (the script prints it at the end): v3 vs v2 in characters/token: web HQ 4.78 vs 4.06; web 4.55 vs 3.87; PDF 4.00 vs 3.59 (log, 8 Nov 00:10). For v2 on documentation outside the training data: 2.28 tok/word (Qwen3.8 248k: 2.57). Also check that industry terms are encoded as a single token (kod/test_tok2.py <file.model>).
4

Cross-source deduplication (dedup3b)

time: ~2.3 h on 64 cores (measured)
Goal
Remove documents repeated across sources (web vs HQ-Plus vs PDF vs DynaWord vs HPLT), keeping the copy from the most valuable source. Within a single source near-duplicates are not removed (the HF sources are already deduplicated).
Method
In sequence (kod/dedup3b.py): (1) exact xxh64 text hash (lowercased, whitespace collapsed), also within a source; (2) URL only across sources (normalized: no scheme, www., #, trailing /; disabled for the HQ-Plus/FW-2 and Edu/FinePDFs pairs); (3) MinHash LSH on word 5-grams, 14 bands × 8 hashes (as in FineWeb-2), cross-source only; one shared band = candidate, then connected components (scipy); (4) within a component the source with the highest priority is kept: dynaword > finepdfs_edu > fw2hqplus > finepdfs > fineweb2 > hplt3. Text normalization per datatrove simplify_text. Jobs of 200,000 rows; HPLT is removed by URL only.
Commands
# zen5; kod/dedup3b_pelny.sh (resumable stages: plan, sig, match, write, sample, all)
RUN="systemd-run --user --scope -p MemoryMax=200G nice -n 15 venv/bin/python kod/dedup3b.py"
$RUN plan
$RUN sig --procs 64
# wait for HPLT_PQ_GOTOWE in dziennik/hplt_do_parquet.log (conversion from stage 2)
$RUN plan --hplt                                  # HPLT at the end of the plan: job IDs and signatures without HPLT remain valid
/usr/bin/time -v $RUN all --procs 64
cp korpus/dedup3b_work/statystyki.json korpus/dedup3b/statystyki.json   # marker DEDUP3B_GOTOWE
# after an OOM during write (8 Nov): kod/dedup3b_dokoncz.sh = find korpus/dedup3b -name "*.tmp" -delete; $RUN write --procs 64; $RUN sample
Output
korpus/dedup3b/<src>/<src>__[<sub>__]<file>__<group>.parquet (zstd 6; columns text, src, url, id, quality_score, edu). The signatures in korpus/dedup3b_work (30 GB) are worth keeping for adding sources later. Result (log, 8 Nov 16:42): documents 213.6 million → 179.0 million (−16.2%), characters 925 G → 715 G (−22.7%), i.e. approx. 150-170 billion v3 tokens (estimate; measured on 11 Nov on held-out files of each source: approx. 161 billion). By source (G characters after dedup): DynaWord 17.06 · FinePDFs-Edu 27.71 · HQ-Plus 49.90 · FinePDFs 119.53 · FW-2 384.10 · HPLT (10+9) 116.94.
Check
$RUN sample draws 20 pairs (seed 0, half exact, half near-dup) and computes the 5-gram Jaccard. Result of 8 Nov: 18 true duplicates, 2 pairs are the same URL with different content (URL rule) → 1.62 million documents to restore. dedup3b_analiza.py breaks down the causes of near-dup removals (band / URL / chain).
Pitfalls
The HPLT zstd stream reads at 20 MB/s and cannot be split → convert to parquet first. Collecting 200 thousand long documents in lists × 64 processes > 200 GB of RAM → streaming write via ParquetWriter in batches of 5000 (dedup3b.py:345-354). zen5 disk after dedup: 264 GB free (97%).
5

1B and 3B mixtures and decontamination against test sets

time: to be completed (mixture v1 of 2 billion tok: ~6 min, 24 proc.)
Goal
Build from the corpus the files train.bin, anneal.bin (annealing-phase data) and val.bin in uint16 format with EOS=3, with the specified token quotas per source and without documents overlapping the test sets.
1B mixture
kod/mieszanka_1b.py (source: the corpus before dedup3b). Plan in billions of tokens: train hqplus 9.0 · fw2_reszta 6.0 · finepdfs 4.5 · finepdfs_edu 1.5 · dynaword 4.0 · industry 0.1; anneal finepdfs_edu 1.0 · hqplus_top 0.8 (quality_score ≥ 0.8) · wikipedia 0.4 · biblioteka_nauki 0.3 · wolne_lektury 0.15 · industry 0.05 · domain 0.1. Legal texts in DynaWord capped at 35%; val 0.2% of documents; 64 processes; multiplier = quota/available (integer part = repetitions, fraction = random copy). Result (log, 8 Nov): train 25.43 billion (HQ-Plus 9.0 · FW-2 5.9 · FinePDFs 4.57 · Edu 1.55 · DynaWord ×1.6 4.3 · industry ×7.7 0.095), anneal 2.81 billion, val 0.317 billion. Domain articles held out for evaluation (137, list ewal_wlasne/domena_heldout_klucze.json from ewal_wlasne_buduj.py) are excluded.
venv/bin/python kod/mieszanka_1b.py [--tylko-pomiar]   # → dane/mieszanka_1b/{train,anneal,val}.bin, statystyki.json; marker MIESZANKA_1B_GOTOWA
# annealing with domain data (added during the 1B run): anneal_z_domena.bin = anneal.bin + 2226 articles × 3 (18.7 million tok) = 2.870 billion
venv/bin/python kod/anneal_domena.py
3B mixture
kod/mieszanka_3b.py (source: korpus/dedup3b). Plan in billions of tokens: train fineweb2 22.0 · finepdfs 10.0 · fw2hqplus 10.0 · hplt3 8.0 · dynaword 4.5 · finepdfs_edu 5.0 · industry 0.15; anneal finepdfs_edu 2.0 · hq_top 2.0 (top 20% of HQ-Plus by quality_score, threshold from a 1% sample) · wikipedia 0.8 · biblioteka_nauki 0.6 · wolne_lektury 0.3 · industry 0.1 · domain 0.2. Val 0.1%; 16 processes. Result (handoff of 10 Nov): train 60.4 billion (fineweb2 22.1 · finepdfs 10.1 · fw2hqplus 10.0 · hplt3 8.2 · dynaword 4.7 · finepdfs_edu 5.2 · industry 0.14), anneal 6.2 billion, val 0.17 billion. The mix after decontamination (below), used for 3B pretraining, has 55.3 billion training tokens and 5.3 billion annealing tokens (measured on 11 Nov). FW-2 and HPLT in dedup3b have no quality_score, so they are sampled randomly (HPLT = bins 9-10 only).
# memory: 48 and 24 processes = OOM in a 60G scope; 16 proc. works with MemoryHigh 64G / MemoryMax 80G (handoff of 10 Nov)
systemd-run --user --scope -p MemoryHigh=64G -p MemoryMax=80G venv/bin/python kod/mieszanka_3b.py --odkaz   # → dane/mieszanka_3b_odkaz; log dziennik/mieszanka_3b_odkaz.log
venv/bin/python kod/mieszanka_3b.py --tylko-anneal       # rebuild of anneal.bin alone (os.replace: a running training keeps the old inode)

To be completed: the exact launch line of mieszanka_3b.py --odkaz is not in the repo (the 3B scripts only wait for its log); the line above combines the memory parameters from the handoff with the flag from the script.

Decontamination
Two passes and a gate:
  • In the mixture (--odkaz): the set of token 13-grams from the test sets that occur in exactly one test document; a training document is dropped at ≥ 10 distinct hits (PROG_ODKAZ = 10, approx. 22 consecutive shared tokens). Applies to train, anneal and val.
  • Over the .bin files (kod/odkaz_bin.py <in> <out>): relative threshold min(10, ceil(0,5 × liczba 13-gramów dokumentu testowego)); phrases shared by > 3 test documents are skipped as templates; a 13-gram does not cross EOS. Introduced after the gate of 10 Nov 11:03, at which PolEval was 15% contaminated.
  • Control scan (kod/skazenie_13gram.py <train.bin>): for each test document, the fraction of its 13-grams present in the training data; “contaminated” = ≥ 50%. Sets: ewal_wlasne/domena_heldout.parquet, terminologia.jsonl, ewal/dane/*/{test,validation,dev}, the whole poleval2018_10k.
# from kod/s3b_8kart_v2.sh: 2nd-pass decontamination, scan and gate
systemd-run --user --scope -p MemoryHigh=40G -p MemoryMax=56G nice -n 15 venv/bin/python kod/odkaz_bin.py dane/mieszanka_3b_odkaz dane/mieszanka_3b_odkaz2 > dziennik/odkaz2.log 2>&1
systemd-run --user --scope -p MemoryHigh=36G -p MemoryMax=48G nice -n 15 venv/bin/python kod/skazenie_13gram.py dane/mieszanka_3b_odkaz2/train.bin > dziennik/skazenie_odkaz2.log 2>&1
# gate: domena_heldout skazone_50 == 0 and poleval2018_10k/train skazone_50 < 0.01; otherwise STOP, 3B does not start

Result of 10 Nov (s3b_start4.sh:2-3): domain 0% contaminated, PolEval 1.1% (the 1% threshold exceeded by 0.1 pp; data deemed clean, PolEval reported on the clean subset, stage 10).

Check
Markers MIESZANKA_1B_GOTOWA / MIESZANKA_3B_GOTOWA, ODKAZ2_GOTOWE, SKAZENIE_GOTOWE; token counts per source in statystyki.json (compare with the plan), pomiar.json (characters/token per source), skazenie_13gram.json (fields dok, skazone_50, jakikolwiek_13gram, sredni_odsetek).
Pitfalls
Python 3.14 on zen5 starts processes via forkserver, so global variables (thresholds, id sets) do not reach the Pool: in the 3B mixture the hq_top threshold did not work (fixed 10 Nov 04:37), and in the 1B mixture the id filters (fw2_reszta without HQ-Plus, finepdfs without Edu) most likely did not work → some documents appear 2× in 1B (to be checked, not fixed retroactively). Remedy: get_context("fork").Pool or an initializer. Keep id sets as sorted np.uint64, not Python objects (those are copied into every process). splitlines() splits on U+2028/U+0085 inside JSON → split("\n").
6

Pretraining 1B (WSD, annealing with domain data) and 3B

time: 1B 41 h (measured) · 3B ≈ 9 days on 8 GPUs (pretraining completed on 19 Nov)
Goal
The base language model. The trainer is a single file, kod/stanislaw.py (in the style of llama2.c / nanoGPT): a decoder with RMSNorm, RoPE, SwiGLU, SDPA, tied input and output weights, AdamW (β 0.9/0.95, fused), clip 1.0, weight decay 0.1 on matrices. WSD schedule: warmup → constant lr → linear decay over the last 10% of steps on the anneal.bin data. Checkpoint <out>/ckpt.pt every --co_ile steps, written via .tmp and os.replace; rerunning the same script resumes from the checkpoint with new data windows (seed shifted by the step).
Before 1B
Scaling down was tested along the way: 30M (shapes 512×7, 384×14, 320×20; 31,800 steps × 65,536 tok ≈ 2.08 billion, ~4.1-5.5 h on a V100; kod/pre_30m.sh) and 125M (768×16, 4 GPUs DDP, 9540 steps × 262k; kod/start_zen5.sh). Findings: shape at 30M does not matter (differences ~0.01 bpb), 30M→125M −0.12 bpb; web data in the mix is necessary (125M trained on DynaWord alone lost on FineWeb-2). This is not a prerequisite for reproducing 1B, but it is a cheap test of the whole pipeline.
1B: command
# kod/start_1b.sh (zen5, 8 GPUs). Waits for MIESZANKA_1B_GOTOWA. Launch: tmux new -d -s stan-1b kod/start_1b.sh
env STAN_TOK=$PWD/tokenizer/stanislaw_unigram32k_v3.model CUDA_DEVICE_ORDER=PCI_BUS_ID PYTORCH_ALLOC_CONF=expandable_segments:True \
  nice -n 5 venv/bin/torchrun --standalone --nproc_per_node 8 kod/stanislaw.py pretrain --dane $PWD/dane/mieszanka_1b \
  --dtype bf16 --kompiluj 1 --out przebiegi/s1b --dim 2048 --layers 22 --heads 16 --hidden 5632 --seq 2048 \
  --batch 8 --akum 8 --kroki 26700 --warmup 2000 --lr 4e-4 --lr_min 4e-5 --harmonogram wsd --anneal 0.1 \
  --ewal 500 --ewal_batchy 20 --co_ile 250 >> dziennik/s1b.log 2>&1
# global batch = 8 × 8 × 8 × 2048 = 1,048,576 tok/step; 26,700 steps ≈ 28 billion tok; annealing from step 24,030

Model: 1.198 billion weights (2048 × 22, 16 heads, SwiGLU 5632, context 2048, vocabulary 32,768). DDP with no_sync on micro-batches (all-reduce once per step, crucial over PCIe). Throughput ~200 thousand tok/s in total (~23.7 thousand per GPU).

Annealing with domain data during the run (kod/restart_anneal.sh, tmux stan-restart-anneal): waits for the entry "krok": 24000 in the log, kills the stan-1b session, waits until GPU memory is < 4000 MiB, swaps anneal.bin for anneal_z_domena.bin (the old one → anneal_bez_domeny.bin) and resumes start_1b.sh from the checkpoint. Downtime 30 s (log, 9 Nov 11:35). When reproducing, it is simpler to build anneal.bin with domain data from the start (stage 5).

3B: command
# kod/s3b_start8.sh (8 GPUs, run since 10 Nov) / kod/s3b_start4.sh (4 GPUs). Global batch fixed: 512 × 2048 = 1.05 million tok/step
# resume from przebiegi/s3b/ckpt.pt with identical arguments: kod/s3b_wznow.sh (refuses when the run is alive or the GPUs are busy)
ARCH="--dim 3072 --layers 26 --heads 24 --hidden 8192 --seq 2048 --rope_base 500000"
WSP="--kroki 57000 --warmup 2000 --lr 3e-4 --lr_min 3e-5 --harmonogram wsd --anneal 0.1 --ewal 1000 --ewal_batchy 20 --co_ile 200 --migawki 5000 --dtype bf16 --kompiluj 1"
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 venv/bin/torchrun --standalone --nproc_per_node 8 kod/stanislaw.py pretrain \
  --dane dane/mieszanka_3b_odkaz2 --out przebiegi/s3b $ARCH $WSP --batch 2 --akum 32 >> dziennik/s3b.log 2>&1
# 4 GPUs: CUDA_VISIBLE_DEVICES=2,3,4,5 … --nproc_per_node 4 … --batch 2 --akum 64
# optional --zero 1 (ZeRO-1, AdamW states sharded across GPUs): no tok/s gain (34.8 vs 35.6 thousand), less memory

Model: 3.045 billion weights (d = 3072, 26 layers, 24 heads of 128, SwiGLU 8192, RoPE 500k from scratch, context 2048). 57,000 steps = 60 billion tokens. Measured: 2 GPUs 19.5 thousand tok/s (~54 s/step), 4 GPUs 35.6 thousand tok/s (8.9 thousand per GPU, 82 GB/GPU), 8 GPUs ~77.6 thousand tok/s (~13.5 s/step) → ≈ 9 days. Checkpoint every 200 steps (36.5 GB with optimizer state, measured); --migawki 5000 saves bf16 weights only (wagi_k<step>.pt) for evaluation during the run. The checkpoint is loaded with mmap=True so that the ranks share pages.

Watchdog (kod/s3b_czujka.py --wznawiaj 3, tmux stan-czujka on zen5) checks every minute the number of processes, log freshness, the loss (NaN, a jump of 1.0 above the window minimum) and validation (a rise of 0.15). When a finite loss appears in the log after a checkpoint, it marks that checkpoint as verified (hard link ckpt_dobry.pt, without copying 36 GB). When the processes crash, it calls s3b_wznow.sh itself, at most three times; on a bad loss it does not resume. State in dziennik/s3b_czujka_stan.json, events in dziennik/s3b_czujka.log. Manual return to the verified state: ln -f przebiegi/s3b/ckpt_dobry.pt przebiegi/s3b/ckpt.pt, then s3b_wznow.sh. The live panel on this page is fed by kod/panel_stan_zbierz.py (zen5) via kod/panel_stan_push.sh (Mustang, every 2 min).

3B validation (bpb on the held-out part of the 3B mix): 1.257 (step 1000), 1.073 (2000), 0.955 (3000), 0.947 (4000), 0.884 (5000), 0.844 (6000). Do not compare directly with the 1B curve: the validation mix is different.

Output
przebiegi/s1b/ckpt.pt (fp32 weights + AdamW + scaler + cfg + step), log.jsonl (step, loss, lr, grad_norm, tok_s, val_loss, bpb every --ewal). Weights only: venv/bin/python kod/tylko_wagi.py przebiegi/s1b/ckpt.pt przebiegi/s1b_final_wagi.pt (1B bf16: 2.4 GB according to the model's nameplate). Checkpoint size with the optimizer: 12 B/parameter, i.e. fp32 weights and two AdamW states (1B 14.4 GB, 3B 36.5 GB, measured).
Check
In the log, TRENING_GOTOWY and PRÓBKA: (60 tokens from “Płuczka wiertnicza” (drilling fluid), temperature 0.8). bpb curve on the mix val: 1B step 20,300 → 0.826; during annealing 0.80-0.86 (val = web mix, 20 batches, noisy). After training (stage 10): mix val bpb 0.583, held-out domain 0.676, terminology 0.907. For 3B, checking during the run via snapshots. The trainer stops by itself on a NaN/inf loss after warmup (exit code 2).
Pitfalls
3B: a batch of 4 per GPU fits on one GPU, but with the DDP gradient buffers it runs out of memory (OOM) → batch 2 and more accumulation. 1B annealing: swapping the file during the run requires killing the processes and checking GPU memory before the restart. A run longer than a few days on a shared machine: agree with the owner which GPUs are free (GPUs 0, 1, 6, 7 were taken again).
7

Extending the 1B context to 8k

time: ~7 h on 2 GPUs (start 01:58, end ~9:00; from the handoff)
Goal
Continued pretraining of the s1b_final base with context 8192 and RoPE base 10,000 → 500,000 (ABF, arXiv:2309.16039), on ~1 billion tokens dominated by long documents (recipe of Fu et al. 2024, arXiv:2402.10171), without loss of quality at 2k.
Data
kod/kontekst8k_dane.py [mld_dlugich=1.2] [mld_krotkich=0.5]: documents ≥ 4096 tokens from FinePDFs-Edu, Wolne Lektury, Biblioteka Nauki and the domain corpus (excluding held-out ones); 1% to val by key hash; short = random contiguous chunks of 1 million tokens from mieszanka_1b/train.bin (seed 8192); long and short chunks interleaved. 24 processes. Result: 73,332 long documents, 1.2 billion long + 0.5 billion short, val 11.5 million (log, 9 Nov 22:34). Output dane/kontekst8k/{train,val}.bin, statystyki.json, marker GOTOWE.
Command
# kod/kontekst8k_1b.sh (zen5, GPUs 3,4). Waits for the data's GOTOWE and SFT7_GOTOWY (GPUs released)
CUDA_VISIBLE_DEVICES=3,4 venv/bin/torchrun --standalone --nproc_per_node 2 kod/stanislaw.py pretrain --dane dane/kontekst8k --out przebiegi/s1b_8k \
  --init przebiegi/s1b_final_wagi.pt --seq_sft 8192 --rope_base 500000 --dtype bf16 --kompiluj 1 \
  --batch 2 --akum 16 --kroki 2000 --warmup 100 --lr 1e-4 --lr_min 1e-5 --harmonogram wsd --anneal 0.2 --ewal 250 --ewal_batchy 10 --co_ile 250 \
  || { echo "$(date) KONTEKST8K_BLAD (trening)" >> dziennik/kontekst8k.log; exit 1; }
venv/bin/python kod/tylko_wagi.py przebiegi/s1b_8k/ckpt.pt przebiegi/s1b_8k_wagi.pt
CUDA_VISIBLE_DEVICES=3 venv/bin/python kod/ewal_kontekst.py przebiegi/s1b_8k_wagi.pt > ewal/wyniki/s1b_8k_kontekst.json 2>&1   # marker KONTEKST8K_GOTOWY
# 2000 steps × 2 × 16 × 2 × 8192 = 524,288 tok/step ≈ 1.05 billion tok; 42 thousand tok/s
Check
kod/ewal_kontekst.py <weights.pt> [n_okien=40] [n_hasel=8]: (1) bpb in 8192 windows from kontekst8k/val.bin in position bins 0-1k / 1-2k / 2-4k / 4-8k; (1b) bpb on 2048 windows from mieszanka_1b/val.bin as a regression check; (2) “passkey in a haystack” (Mohtashami and Jaggi 2023): a 5-digit passkey inserted at a depth of 10/30/50/70/90% of a document of length 2048/4096/8192, greedy answer of up to 8 tokens. Baseline s1b_final: passkey 2k 100%, 4k/8k 0%; bpb 0.72 (1-2k) → 1.31 (2-4k) → 2.14 (4-8k); mix bpb 2k 0.830. After 8k: passkey 97.5% at 4k and 8k, no regression at 2k (confirmed on 12 Nov in the file ewal/wyniki/s1b_8k_kontekst.json: on average 100% / 97.5% / 97.5% for 2k / 4k / 8k).
Pitfalls
Batch 4 × 8192 = OOM on 1B (32k × 8192 logits in fp32) → batch 2 × accumulation 16. The script without set -e wrote a false GOTOWE after the training crashed → marker KONTEKST8K_BLAD and || exit 1.
8

SFT data: solver, paraphrases, RAFT, contrast, refusals

time: solver generators: minutes · paraphrases and RAFT: to be filled in (hours, depending on the teacher)
Goal
Three kinds of fine-tuning data: a) engineering tool calls with deterministic ground truth from the solver, b) question paraphrases for robustness to phrasing, c) RAFT: answers from documents citing the source [n], or a refusal. Doctrine: facts in RAG, numbers in the solver, only behavior in the weights.
Teachers, stated plainly
What requires a teacher model. The solver generators, the MCM parser, synthetic refusals, and RAFT splitting and lengthening are plain code (no LLM at all). Paraphrases, RAFT questions and answers, and the judge of contrastive pairs use a local teacher model served through an OpenAI-compatible API (vLLM / SGLang). This is not an AI assistant: a human launches the model server from open weights and the scripts that query it; validators in the code reject bad outputs. Teachers used: Qwen3-30B-A3B-Instruct-2507 (Apache-2.0; paraphrases; rejected for RAFT because its Polish is too weak), Qwen3.8-27B (RAFT, 1B data) and Bielik-11B-v2.3-Instruct (RAFT, 1B data). The paraphrase test set is optimistic, because the same teacher paraphrased train and test.
a) Solver
Five tools: hydrostatyka (hydrostatics), strata_rura (models bingham/pl/hb/newton), mcm (minimum curvature), trajektoria_hdd, reologia_fit (hb_12pt / bingham_12pt) + refusals (<f:brak_narzedzia>, 12% of records: 60% questions outside the tools, 40% hydrostatics with a missing input). Ground truth is computed by a Rust solver: solver_cli <command> (JSON on stdin, timeout 20 s). Example format: <pytanie>…</pytanie><wywolanie><f:NARZ>{json}</wywolanie><wynik>{json}</wynik><odpowiedz>…</odpowiedz>; the result is formatted by the deterministic KOMPAKT, and the <wynik> block is excluded from the loss (at run time the solver inserts it).
  • v1 generator_solver.py <directory> [n=3000] (seed 20261107): narrow ranges, 3-8 templates per tool, MCM 3-5 stations; split 70/20/10 (test = different templates; out-of-range = parameters outside the training ranges). Result: train 11,776 / test 3508 / out-of-range 1516.
  • v2 generator_solver_v2.py <directory> [n=4000] (seed 20261108): wide, log-uniform ranges (e.g., rho 800-2500, L 20-12,000 m, q 0.001-0.15 m³/s), MCM 2-12 stations, test poza_v2 from extreme values (MCM 13-16). Result: train 15,810 / test 4575 / poza_v2 2015. Lesson: v1 bound a number to a key by its magnitude and truncated lists.
  • v3 generator_solver_v3.py <directory_v3> [n=4000] [pliki do konwersji] (seed 20261109): an MCM contract in which the model emits <f:mcm>{"zrodlo": "pytanie"} and the stations are extracted by the deterministic parsery.stacje_mcm (returns None when uncertain → asks the human); +6 trajectory templates with different word order. v3 data: 15,714 + paraphrases v1 25,728 + v2 21,806 = 63,248 examples.
  • v4 generator_solver_v4.py korpus/solver/v3/reologia_v4_train.jsonl [n=3000]: 6 rheology question templates with “granica płynięcia” (yield point) (after the regression in SFT3, see stage 9).
Anti-pattern confirmed by measurement: an LLM as a table copier (MCM 13-16 stations: 0-5% without the parser, 99/99 with the parser).
b) Paraphrases
teacher python3 kod/parafrazy.py <in.jsonl> <out.jsonl> [na_rekord=2] [limit=0], 48 threads, 6 styles, temperature 0.8, top_p 0.95, max 300 tokens. The hard validator rejects a paraphrase when the multiset of numbers has changed, a unit has gone missing (kg/m3, m3/s, 1/s, Pa, mm, °), the name of the rheological model has changed, or the text is > 3× longer. Result for train v1: 25,730 accepted (rejections: numbers 7382, model 1401, format 811); v2: 21,806. Teacher: vLLM on atari, GPU 5 (kod/atari_po_restarcie.sh:10):
CUDA_VISIBLE_DEVICES=5 vllm serve <Qwen3-30B-A3B-Instruct-2507-AWQ weights> --served-model-name qwen3-30b-a3b \
  --quantization awq --tensor-parallel-size 1 --max-model-len 32768 --kv-cache-dtype fp8_e5m2 --gpu-memory-utilization 0.92
c) RAFT

Index (no generative LLM): python3 kod/rag_indeks_domena.py [równoległość=4] builds the Qdrant collection stanislaw_domena from korpus/domena: chunks of ~600 characters with the title, bge-m3 embeddings (1024, cosine) via Ollama, a full-text index; ~25 chunks/s. Result: 139,721 chunks (106,764 PL). A second collection, superwiertnik (253,174 chunks, ~91% EN), is read-only.

Generator teacher: python3 kod/raft.py <out.jsonl> [n=15000] [rown=32]. Env: QDRANT, OLLAMA, RERANK (reranker address), NAUCZ (teacher API address), MODEL_N, UDZIAL_WYROCZNI (default 0.8), PULAPKI_TRUDNE=1, SEED. Flow: a question from the teacher (120 tok, T 0.4) → hybrid search over 2 collections + reranker (top 12) → context: oracle + 3 distractors, or no oracle (half of the distractors from positions 6-12, in hard mode the 4 nearest) → answer (300 tok, T 0.2) with checks: a refusal has a single form (“Nie wiem - podane dokumenty nie zawierają odpowiedzi.” (I don't know - the given documents do not contain the answer.)), the answer must cite [oracle no.], all numbers must come from the context or the question. Format: <kontekst><zrodlo>[n] src</zrodlo>tekst…</kontekst><pytanie>Q</pytanie>(<odmowa>)<odpowiedz>A</odpowiedz>.

Extensions: raft_kontrast.py <raft_train> <out> [n=3000] [rown=48] YES/NO judge: removes the oracle, adds the nearest document, the teacher (T 0, 5 tokens) rules whether the question can be answered; NO → contrastive refusal. raft_odmowy.py <in> <out> <n> [ziarno=1] code: synthetic refusals (question from a, context from b; test only from test examples). raft_dlugi.py <in> <out> [k_min=6] [k_max=10] [seed] code: adds 6-16 distractors and renumbers [n] (data for SFT on the 8k base). raft_podziel.py plik1.jsonl … <prefix> code: merges and splits 95/5 by oracle hash (the same oracle is never in both parts).

Teachers for the 1B data (log, 9 Nov): Qwen3.8-27B via SGLang on zen5 (GPU 5) and Bielik-11B-v2.3 via SGLang (GPU 2), generators on Mustang through SSH tunnels. To be filled in: the SGLang and tunnel start commands are not in the repo; also missing are the commands that produced the files odmowy_*, rall_*, r7_* (only their uses in the SFT scripts exist). Set r8: 20,564 records (contrast 1919, raft_v3_b 3086, raft_v3_q 1510); rall test 500 (158 refusals, including 78 hard ones from the teacher).

Check
Markers PARAFRAZY_GOTOWE, INDEKS_GOTOWY, RAFT_GOTOWY, KONTRAST_GOTOWY. Before splitting, clean the JSONL (truncated last line, json.loads on every line, fields wyrocznia and rodzaj; this is what noc_sft8_mustang.sh:20-29 does). An acceptance rate of ~67% for paraphrases is normal. The first baseline without training: baseline_reguly.py <directory> (keywords + regex; v1 test: tool 0.938, result 0.81, refusal 0.515).
9

SFT: v3 base, joint fine-tunings (SFT6/SFT8), SFT on the 8k base

time: SFT v3 1B ~35 min (2 GPUs, measured) · SFT10 on 2 × V100: 4 h 37 min (measured) · SFT6/SFT8: to be filled in
Goal
Teach the base model behavior: tool choice and arguments (numbers copied from the question), an answer citing its source, a refusal when the documents do not contain the answer. A rule confirmed by measurement: one joint fine-tuning on all the data is better than successive fine-tunings (SFT6 > SFT5; log 9 Nov 22:00).
Mechanics
Mode stanislaw.py sft --init <weights> --sft plik1.jsonl,plik2.jsonl,…. Loss mask (stanislaw.py:69-75): loss computed from the token after </pytanie>; the <wynik>…</wynik> block has no loss; EOS appended; examples longer than the context are dropped. Data multiplier = repeating a file in the list. --seq_sft N sets a longer context (RoPE on the fly). --kubelki 1: batches from a single length bucket (512/1024/2048/4096/8192) with a fixed token budget B × T.
Recipes
ScriptGPUsStart (--init)Data (--sft)Parameters
sft_1b_atari.sh (SFT v3, tool base)atari 4+5, fp16s1b_final_bf16.ptv3/solver_train, v3/v1p_…, v3/v2p_… (63,248)seq_sft 1024, batch 4, accum 8, 1500 steps, warmup 50, lr 1e-4→1e-5 → s1b_sft_v3_wagi.pt
sft6_1b.sh (best balanced)zen5 3,4, bf16s1b_sft_v3_wagi.ptv3 ×3 files, reologia_v4 ×2, rall_train ×2, rall_odmowy_train (98,451)seq 1536, batch 12, accum 2, 2000 steps, warmup 50, lr 5e-5→5e-6
sft8_1b.sh (candidate for best)zen5 2,5s1b_sft_v3_wagi.ptas SFT6, but r8_train ×2 instead of rall2400 steps, rest as SFT6
sft9_1b.shzen5 2,5s1b_sft_v3_wagi.ptSFT8 + r8_pozytywy_pulapki ×12400 steps; target: false refusals ≤ 0.03 with hard ones ≥ 0.65
sft10_atari.sh sft10atari 4+5, fp16s1b_sft_v3_bf16.ptSFT9 recipe on r10 (r8 + kontrast2 1614 + raft_v4_b 2370 = 24,548 records)seq 1536, batch 1, accum 24 (batch 2 = OOM on 32 GB), 2400 steps, lr 5e-5→5e-6
sft10_atari.sh sft10aatari 4+5, fp16s1b_sft_v3_bf16.ptSFT8 recipe on r10 (more refusals in the mix)as sft10
sft8k_1b.sh phase Azen5 2-5, DDP ×4s1b_8k_wagi.ptv3 ×3seq 1024, batch 8, accum 2, 1500 steps, lr 1e-4→1e-5 → s1b_8k_sft_v3_wagi.pt
sft8k_1b.sh phase Bzen5 2-5s1b_8k_sft_v3_wagi.ptv3 ×3, reologia_v4 ×2, r8_train, r8_train_dlugi, rall_odmowy_trainseq 8192, --kubelki 1, batch 2, accum 1, 2400 steps, lr 5e-5→5e-6
sft_3b_c64.sh (SFT11 pilot on intermediate 3B)c64 0-3, fp16, FSDP ×4s3b_k9200_bf16.ptlist from dane_sft11/ (181,235 examples)seq 1536, batch 4, accum 3, 48 sequences per step, 4000 steps, lr 5e-5→5e-6, warmup 50
sft12_3b_c64.sh (SFT12 on the same weights)c64 0,2,4,6, fp16, FSDP ×4s3b_k9200_bf16.ptlist from dane_sft12j/ (after the language review)as above; GPUs started one at a time, evaluation and paired comparison in the c64_kolejka_sft12.sh queue

The path that led here (SFT2-SFT5, sft2_1b.sh…sft5_1b.sh) is in the repo and in the log; to reproduce, SFT v3 → SFT6 or SFT8 is enough.

Command
# template (kod/sft6_1b.sh); tmux: env in the command string
cd <project directory>; export STAN_TOK=$PWD/tokenizer/stanislaw_unigram32k_v3.model CUDA_DEVICE_ORDER=PCI_BUS_ID PYTORCH_ALLOC_CONF=expandable_segments:True
cat dane_raft/rall_test.jsonl dane_raft/rall_odmowy_test.jsonl > dane_raft/rall_test_z_odmowami.jsonl
V=korpus/solver/v3; R=dane_raft
CUDA_VISIBLE_DEVICES=3,4 venv/bin/torchrun --standalone --nproc_per_node 2 kod/stanislaw.py sft --init przebiegi/s1b_sft_v3_wagi.pt --out przebiegi/s1b_sft6 \
  --sft $V/solver_train.jsonl,$V/v1p_solver_train_parafrazy.jsonl,$V/v2p_solver_train_parafrazy.jsonl,$V/reologia_v4_train.jsonl,$V/reologia_v4_train.jsonl,$R/rall_train.jsonl,$R/rall_train.jsonl,$R/rall_odmowy_train.jsonl \
  --dtype bf16 --kompiluj 1 --seq_sft 1536 --batch 12 --akum 2 --kroki 2000 --warmup 50 --lr 5e-5 --lr_min 5e-6 --ewal 1000
venv/bin/python kod/tylko_wagi.py przebiegi/s1b_sft6/ckpt.pt przebiegi/s1b_sft6_wagi.pt
# evaluation: ewal_raft.py (n=500 rall_test_z_odmowami, n=100 rall_test_trudne_odmowy) + ewal_narzedzia_dwuetapowo generuj (stage 10)

The exact file lists and GPUs are in each kod/sftN_1b.sh script; the block above reproduces the SFT6 mix from the table.

Output and results
przebiegi/s1b_sftN_wagi.pt. 1B results (handoffs 9-10 Nov):
MetricSFT6SFT7SFT8
Hard refusals (n=78)0.5000.5130.667
Correct refusal (500)0.8730.8610.930
False refusal (threshold ≤ 0.03)0.0180.0180.035
Oracle citation0.7960.7800.794
Numbers from context0.8630.8860.914
Tools v2 / outside v2 / v1 outside / paraphrases0.982/1.000/0.970/0.9600.977/0.995/0.975/0.9770.982/1.000/0.960/0.966
Reference: Qwen3.8-27B with tools 0.996 solver result (v1 test); 1B after SFT v3 ≈ 27B at calling the solver.

r10 test (1079 questions: 142 hard refusals, 937 questions answerable from the documents; all models on the same hardware, 2 × V100, 11 Nov):

MetricSFT9SFT8SFT10SFT10a
Hard refusals (142)0.5350.6550.7890.859
False refusal (937)0.0480.0730.1260.186
of which questions with traps (378)0.1080.1510.2780.381
of which questions with the oracle in the context (559)0.0070.0200.0230.054
Oracle citation0.7620.7880.7820.794
Numbers from context0.8680.8860.8670.862

Conclusion: SFT8 stays for RAG. Each further step along the curve costs more (SFT9→SFT8: +17 correct refusals for +23 false ones; SFT8→SFT10: +19 for +50; SFT10→SFT10a: +10 for +56). Question-by-question pairing (McNemar's test) confirms the differences (p on the order of 10-10 for false refusals of SFT8 vs SFT10). The false refusals sit in questions with traps where the oracle fragment did not make it into the context and the answer has to be assembled from other documents; approx. 8% of such reference answers themselves state “w dokumentach tego nie ma” (“this is not in the documents”), i.e. the data has label noise. Plan for r11: relabel these cases, a separate metric for refusals expressed in prose, training data for judging whether the context is sufficient.

Pitfalls
SFT3 (RAFT + little tool data) forgot the reologia_fit schema: on the “granica płynięcia” (“yield point”) test template the model picked the right tool but the argument schema of strata_rura (in training the phrase appeared only with pressure loss) → generator v4 and joint fine-tuning. A threshold on P(<odmowa>) (ewal_odmowa_prog.py) does not help: in hard cases the model is confident in its answer (a limit of 1B, not of calibration). The measurement of 11 Nov (kod/raft_prog_prawdop.py) refines this: a threshold at the decision point (the first token after </pytanie>) does not improve discrimination, but it replaces successive fine-tunings as the way to set the trade-off (AUC SFT8 0.918, SFT9/10/10a 0.910–0.920). In ewal_raft.py the threshold is set by the STAN_PROG_ODMOWY variable, off by default (without the threshold the result is bit for bit as before, 1079/1079).
10

Evaluation

time: Bielik polish_mc baseline 68 min (V100, measured) · the rest: minutes to hours
Goal
Measure separately language (bpb), domain knowledge (terminology), behavior (tools, RAFT, refusals) and context (passkey). Always on held-out sets and, where possible, on a clean subset (no 13-gram contamination).
Tools
  • bpb on the clean subset code: python kod/ewal_czysty.py <model.pt | HF directory> <out.json> [n_poleval=2000]. For each document of the held-out domain set (137 art.) and of PolEval 2018 it computes bpb = ΣNLL/ln2/Σbytes over non-overlapping windows, plus the share of 13-grams present in the 1B data; it reports the subsets wszystkie / czyste_0 / ponizej_10 / skazone_50. This is how the numbers in part I were obtained (PolEval 0.924-0.929 vs Bielik 0.940; domain 0.686/0.723 vs 0.679).
  • bpb vs Goldfish: kod/bpb_porownanie.py <val.bin|parquet> <ckpt> [model_hf=goldfish-models/pol_latn_1000mb] [n_dok=2000] (note: Goldfish's Albert normalization collapses whitespace, which favors it).
  • Terminology code: sentence pairs differing in one term (correct vs calque: świder/wiertło, szybkość/prędkość ścinania, wciąganie/przeciąganie, graniatka/kelly… (drill bit, shear rate, pipe pull-back, kelly)), score = share of pairs in which the correct sentence has the higher log-probability per byte, chance level 0.5. ewal_terminologia.py builds terminologia.jsonl (23 terms in the code), ewal_terminologia_licz.py <jsonl> {stanislaw:<ckpt>|hf:<repo>} scores it. Version used in the results: 86 pairs (CI ~±6-11 pp). Results: 1B 0.907 · Bielik 11B 0.872 · Goldfish 125M 0.779 · Qwen3.8-27B 0.733.
  • Tools, in two stages code: generation on the GPU without the solver, scoring with the solver without the GPU (no need to move weights over the 0.6 MB/s link):
    # zen5 (GPU): shuffling Random(7), n from each set, prompt <pytanie>…</pytanie><wywolanie>, 200 tokens, constrained decoding
    venv/bin/python kod/ewal_narzedzia_dwuetapowo.py generuj przebiegi/s1b_sft8_wagi.pt dziennik/sft8_gen.jsonl $V/solver_test.jsonl,$V/solver_test_poza_v2.jsonl,… 200
    # atari (solver): metrics wybor_narzedzia, wynik_solvera, odmowa, zly_json, per_narzedzie
    venv/bin/python kod/ewal_narzedzia_dwuetapowo.py ocen dziennik/sft8_gen.jsonl > ewal/wyniki/s1b_sft8_narzedzia.json
    Constrained decoding (stanislaw.py:204-245): numbers in the JSON arguments can only be numbers copied from the question (a candidate's prefix while in progress, the full candidate + a ,]} character on closing); the top-256 logits are checked; stop on </wywolanie>.
  • RAFT code: python kod/ewal_raft.py <ckpt> <raft_test.jsonl> [n=300]: greedy generation of 220 tokens; refusal = <odmowa> in the first 20 characters or “Nie wiem” (“I don't know”) in the first 60; metrics odmowa_trafna, falszywa_odmowa (on positives), cytat_wyroczni (whether the answer contains [oracle no.]), liczby_z_kontekstu (every number in the answer occurs in the context or the question).
  • Breakdown of RAFT answers code: ewal_raft.py <weights> <test.jsonl> <n> <records.jsonl> saves each answer with the question's features (type, teacher, source, context length, refusal, citation, numbers); kod/rozbicie_r10.sh does this for four models on atari, kod/raft_rozbicie.py nazwa=plik … counts refusals by feature and pairs models with McNemar's test. Generation is greedy, so the totals match the evaluation without saving.
  • Needle in a haystack (passkey) and bpb by position: ewal_kontekst.py (stage 7).
  • Polish benchmarks: lm-evaluation-harness 0.4.13 with the polish_mc tasks copied 1:1 from the SpeakLeash fork (consistent with the Open PL LLM Leaderboard), a core of 15 tasks / 52,224 examples (polemo2, 8tags, belebele, dyk, ppc, psc, cbd, klej_ner, polqa, multiblimp_pol, hellaswag_pl, arc_easy/challenge_pl, bpb poleval2018_10k), “knowledge” (global_mmlu_pl, include_pl, llmzszl). Run with ewal.py --model stanislaw:<weights> --tok v3 --dtype bf16 --zadania polish_mc|rdzen|wiedza --fewshot 0 --batch N (kod/premiera_1b.sh, 4 GPUs in parallel). To be filled in: the ewal.py harness and the stanislaw_lm.py adapter live on the servers in the ewal/ directory, not in the kod/ repo.
Base 1B results
multiblimp 0.984 (Bielik 0.989); PolEval bpb 0.981 (Bielik 1.056; possible contamination, hence the clean subset); hellaswag_pl 0.435 (0.706); arc_easy 0.443 (0.684); polish_mc and MMLU-PL at chance level (base model without instruction tuning; Bielik polish_mc 0.555, Qwen3.8-27B 0.456). Conclusion from the release: 1B is a strong language model (grammar ~Bielik, better bpb), without general knowledge; in line with the doctrine: knowledge in RAG, numbers in the solver.
Baselines
kod/linie_bazowe_atari.sh (Bielik-11B-v2.3-Instruct fp16 on GPU 1, lm-eval 0-shot, batch 8 → OOM on long “knowledge” prompts; linie_bazowe_atari2.sh with batch 1-2), baseline_27b.py <directory> [n=300] (Qwen3.8-27B via ninfer, 5 tool schemas, temperature 0). Qwen3.8-27B only on zen5 (bf16), never via HF fp16 on V100 (stage 11).
11

Pitfalls and lessons

sources: handoffs 9-10 Nov, log
List
  1. OOM from a fork with the corpus in RAM (atari, 7 Nov 20:35)

    tokenizuj.py v1 held the corpus in memory and forked Pool(80) on 96 threads; copy-on-write copied the pages in every process, load ~97, sshd did not respond for ~10 min, the OOM killer killed the process (43 GB). Rule: shards on disk, 24 processes, nice 10, always systemd-run --scope -p MemoryMax=….

  2. Python 3.14: forkserver instead of fork (zen5)

    Global variables do not reach Pool processes: the hq_top threshold in the 3B mix did not work, and most likely the id filters in the 1B mix did not either (some documents 2×). Remedy: get_context("fork").Pool or initializer.

  3. Qwen3.8 (Gated DeltaNet) via HF transformers fp16 on V100 = Xid 31 → Xid 154 on all GPUs (9 Nov 05:15)

    Without flash-linear-attention kernels, the reference PyTorch kernels gave “too many resources requested for launch”, then an MMU fault; new processes would not initialize CUDA until the node was restarted (kod/atari_po_restarcie.sh restores the services outside systemd). New architectures NOT via HF on V100; Qwen3.8 only on zen5.

  4. OOM in training

    8k: batch 4 × 8192 on 1B (logits) → 2 × accum 16. 3B: batch 4 fits on one GPU, but the DDP gradient buffers = OOM → batch 2. 3B mix: 48 and 24 processes = OOM in a 60G scope (task ~2.2 GB RSS + write buffer) → 16 proc., MemoryHigh 64G / MemoryMax 80G. Dedup: streaming writes instead of lists.

  5. tmux does not inherit env; zsh does not split $E

    Variables directly in the tmux command string. Waiters (scripts that loop over logs via ssh) should be written in bash, not zsh (it splits ssh output badly).

  6. pkill -f catches its own ssh

    Pattern with a bracket: pkill -f "[o]ut przebiegi/s3b", pgrep -f "[e]wal.py".

  7. A script without set -e wrote a false GOTOWE

    After the 8k training crashed, the success marker was written anyway. Every critical step with || { echo BLAD; exit 1; }; gates read the error markers.

  8. Moving weights over a slow ~0.6 MB/s link

    Two-stage evaluation (generation on the GPU where the weights are; scoring with the solver where the solver is) instead of moving files.

  9. Test contamination

    The base PolEval bpb may have been contaminated; the first 3B gate showed 15% contaminated PolEval documents → decontamination in a 2nd pass over the .bin files, a gate (domain 0%, PolEval < 1%), reporting on the clean subset.

  10. DSpine for bulk generation

    Max 8 parallel requests → for data generation, without speculative decoding (SGLang directly). Times in logs always from date.

  11. Swapping a data file during a run

    A running training holds the old inode: swap via os.replace to a new file; for annealing with the domain data, a stop and a resume from the checkpoint are required.

  12. The default tokenizer on atari is the old 16k one (11 Nov)

    Without STAN_TOK=…/stanislaw_unigram32k_v3.model evaluating the 1B model generates nonsense text and crashes on OUT_OF_RANGE: piece id. The trial “passed” because the exit code was checked, not the content. Now ewal_raft.py refuses to start when the tokenizer's vocabulary size does not match the model, and each trial is compared against answers known from an earlier run.

  13. 1B SFT on a Tesla V100 32 GB

    Batch 2 × 1536 in fp16 = OOM on the first step, when AdamW allocates its states; batch 1 × accumulation 24 on two GPUs works (30.2 GB per GPU, ~10.8 thousand tok/s).

  14. Machine owner and disk

    zen5 GPUs 0, 1, 6, 7 were at times taken back by the owner; working disk at 93-96% (≈360-616 GB free at different times). Raw downloads deleted after dedup, with consent; industry texts (Art. 26²) to be removed from zen5 once no longer needed.

Places marked “to be filled in”

Gathered in one place so they can be closed in the next session on the machines (read only).

  • Stage 1: venv package versions on zen5 (torch, CUDA) and the installation method; no requirements file.
  • Stage 2: arguments of pobierz_hf.sh used for HQ-Plus, FinePDFs, FinePDFs-Edu; source and download command for HPLT 3.0 (bins 9-10); the script that collected the domain corpus (2340 art.); download times.
  • Stage 3: v3 tokenizer training time; the step copying v2 to tokenizer/stanislaw.model.
  • Stage 5: the exact mieszanka_3b.py --odkaz command and the build times of the 1B and 3B mixes.
  • Stage 6: size of the 1B checkpoint with the optimizer (3B measured: 36.5 GB).
  • Stage 8: commands starting the SGLang teachers on zen5 (Qwen3.8-27B, Bielik) and the tunnels; the commands that produced odmowy_*, rall_*, r7_*; build of the Rust solver (solver_cli, outside the repo); paraphrase and RAFT times.
  • Stage 9: SFT6 and SFT8 times (steps known, time not).
  • Stage 10: the ewal.py / stanislaw_lm.py harness and the polish_mc task YAML (zen5 /ewal, outside the repo).
Book · first, working edition · November 2026 · in Polish

Stanisław. Polski model inżynierski w praktyce [Stanisław. A Polish engineering model in practice]

Cover of the book “Stanisław. Polski model inżynierski w praktyce”

Research staff and friendly external collaborators

A guide to building, working with and developing a model that computes with solvers instead of guessing: from scratch, in a closed infrastructure, with solvers. 58 pages for an engineer of any specialty who does not know machine learning. The book is in Polish.

This is a working edition. The figures reflect the state as of 12 November 2026, and where a result does not exist yet, the book says so plainly.

Download the book (PDF, 2.6 MB)

Contents

  1. Why your own engineering model
  2. From scratch: what it means and what it costs
  3. Closed infrastructure
  4. Calculations you can trace
  5. How to work with Stanisław
  6. Knowledge from documents
  7. How we know it works
  8. Reproduction step by step, in brief
  9. The plan: 3B, 7B and beyond
  10. Your own model in your organization

Plus an introduction, a glossary and a note on the namesake. Cover: a line drawing made with an image generator from the sketch of the portrait of Prof. Stanisław Stryczek.