<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reinforced Knowledge</title><link>https://reinforcedknowledge.com/</link><description>Recent content on Reinforced Knowledge</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 20 Jul 2026 17:10:00 +0200</lastBuildDate><atom:link href="https://reinforcedknowledge.com/index.xml" rel="self" type="application/rss+xml"/><item><title>When the translator starts solving the problem</title><link>https://reinforcedknowledge.com/posts/when-translation-starts-solving/</link><pubDate>Mon, 20 Jul 2026 17:10:00 +0200</pubDate><guid>https://reinforcedknowledge.com/posts/when-translation-starts-solving/</guid><description>&lt;p&gt;The project stopped being a throughput project when I opened one of the fast outputs and found an answer.&lt;/p&gt;
&lt;p&gt;I was translating a large reasoning dataset into several European languages. The serving stack looked healthy. Requests completed. The inference server returned &lt;code&gt;finish_reason = stop&lt;/code&gt;. Output files had the expected number of rows. The translated text had plausible length. Everything looked fine from the outside. Then I read the samples.&lt;/p&gt;
&lt;p&gt;Inside some of the rows, the model had silently changed jobs. A source example asked for a proof, a program, or a mathematical derivation. The translation prompt asked the model to translate that example. The model sometimes followed the instruction embedded in the source and solved the problem instead. In other cases it restated the prompt, wrote a concise answer, or replaced a long reasoning trace with a much shorter piece of helpful prose.&lt;/p&gt;</description></item><item><title>Anatomy of verl, the RL post-training framework I lived in</title><link>https://reinforcedknowledge.com/posts/verl-retrospective/</link><pubDate>Mon, 01 Jun 2026 21:45:17 +0000</pubDate><guid>https://reinforcedknowledge.com/posts/verl-retrospective/</guid><description>&lt;p&gt;I came to &lt;a href="https://github.com/verl-project/verl"&gt;verl&lt;/a&gt; for a research project: RL on function calling. I needed custom environments where the model interacts with tools and is rewarded on the call it makes. The capability to have custom rewards and eventually the room to modify or write the algorithms. Also, since I was familiar with them, I wanted FSDP and vLLM if I could get them. Oh, and not to forget, the capability to do long horizon training.&lt;/p&gt;</description></item><item><title>Install flash-attn without crying while using uv</title><link>https://reinforcedknowledge.com/posts/installing-flash-attn-with-build-isolation-with-uv/</link><pubDate>Tue, 23 Sep 2025 01:15:24 +0000</pubDate><guid>https://reinforcedknowledge.com/posts/installing-flash-attn-with-build-isolation-with-uv/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/concepts/projects/config/#build-isolation"&gt;&lt;code&gt;uv&lt;/code&gt;’s documentation about build isolation&lt;/a&gt; is already great and has everything you need and I recommend and suggest to read before anything else. Read the whole documentation even, especially if you&amp;rsquo;re just starting with &lt;code&gt;uv&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m writing this article since these last days I had to either install &lt;code&gt;flash-attn&lt;/code&gt; as a wheel directly or build it from source and since I struggled different times, I thought of noting down my path so that it stays fresh in my mind. Unfortunately, at the time I didn&amp;rsquo;t read the documentation when going through all of this cause I thought that I could figure it out quickly. Well…&lt;/p&gt;</description></item><item><title>A story of using langchain/langgraph</title><link>https://reinforcedknowledge.com/posts/a-story-of-using-langchain-langgraph/</link><pubDate>Sat, 19 Jul 2025 02:08:30 +0000</pubDate><guid>https://reinforcedknowledge.com/posts/a-story-of-using-langchain-langgraph/</guid><description>&lt;p&gt;Hi everyone!&lt;/p&gt;
&lt;p&gt;This is going to be a short post, contrary to what I do usually, but I was going to reply to this Reddit post &lt;a href="https://www.reddit.com/r/LangChain/comments/1m2skwu/disadvantages_of_langchainlanggraph_in_2025/"&gt;Disadvantages of Langchain/Langgraph in 2025&lt;/a&gt; and found that my comment was too long and decided to make a Reddit post in and of itself so that maybe more people can see it and maybe it&amp;rsquo;ll resonate with others, and maybe we can gather more stories about using langchain/langgraph or other libraries or just the experiences of developers working in this space.&lt;/p&gt;</description></item><item><title>Python Project Management and Packaging: PEP 751 update and some of the remaining issues of packaging</title><link>https://reinforcedknowledge.com/posts/python-project-management-and-packaging-pep-751-update-and-some-of-the-remaining-issues-of-packaging/</link><pubDate>Fri, 02 May 2025 06:50:50 +0000</pubDate><guid>https://reinforcedknowledge.com/posts/python-project-management-and-packaging-pep-751-update-and-some-of-the-remaining-issues-of-packaging/</guid><description>&lt;p&gt;My first two articles (&lt;a href="https://reinforcedknowledge.com/a-comprehensive-guide-to-python-project-management-and-packaging-concepts-illustrated-with-uv-part-i/"&gt;part 1&lt;/a&gt; and &lt;a href="https://reinforcedknowledge.com/a-comprehensive-guide-to-python-project-management-and-packaging-concepts-illustrated-with-uv-part-2/"&gt;part 2&lt;/a&gt;) on Python project management and packaging gathered a lot of interest and I thought they were comprehensive enough for me not to come back and update them for a moment.&lt;/p&gt;
&lt;p&gt;But, about a month ago, &lt;a href="https://peps.python.org/pep-0751/"&gt;PEP 751 – A file format to record Python dependencies for installation reproducibility&lt;/a&gt;, was accepted, 31 March 2025. At the time of publishing my first two articles, I didn&amp;rsquo;t think that lockfiles would get standardised and I didn&amp;rsquo;t know about the ongoing effort.&lt;/p&gt;</description></item><item><title>A Comprehensive Guide to Python Project Management and Packaging: Concepts Illustrated with uv - Part II</title><link>https://reinforcedknowledge.com/posts/a-comprehensive-guide-to-python-project-management-and-packaging-concepts-illustrated-with-uv-part-2/</link><pubDate>Wed, 20 Nov 2024 19:46:43 +0000</pubDate><guid>https://reinforcedknowledge.com/posts/a-comprehensive-guide-to-python-project-management-and-packaging-concepts-illustrated-with-uv-part-2/</guid><description>&lt;p&gt;In the &lt;a href="https://reinforcedknowledge.com/a-comprehensive-guide-to-python-project-management-and-packaging-concepts-illustrated-with-uv-part-i/"&gt;first part&lt;/a&gt; we delved into the nitty gritty details of initializing and managing the dependencies of a Python package or project. This covered what is a Python package as opposed to a plain project (and other nomenclature), what is defined in the standard (e.g., &lt;code&gt;project&lt;/code&gt;, &lt;code&gt;build-system&lt;/code&gt;, &lt;code&gt;tools&lt;/code&gt; and &lt;code&gt;dependency-groups&lt;/code&gt; tables in &lt;code&gt;pyproject.toml&lt;/code&gt; through the PEPs &lt;a href="https://peps.python.org/pep-0518/"&gt;518&lt;/a&gt;, &lt;a href="https://peps.python.org/pep-0621/"&gt;621&lt;/a&gt; and &lt;a href="https://peps.python.org/pep-0735/"&gt;735&lt;/a&gt;) and what are some common features that tools provide on top of the standard (e.g., lock files, editable dependencies).&lt;/p&gt;</description></item><item><title>A Comprehensive Guide to Python Project Management and Packaging: Concepts Illustrated with uv - Part I</title><link>https://reinforcedknowledge.com/posts/a-comprehensive-guide-to-python-project-management-and-packaging-concepts-illustrated-with-uv-part-i/</link><pubDate>Wed, 06 Nov 2024 00:04:38 +0000</pubDate><guid>https://reinforcedknowledge.com/posts/a-comprehensive-guide-to-python-project-management-and-packaging-concepts-illustrated-with-uv-part-i/</guid><description>&lt;p&gt;The goal of this guide is to provide a comprehensive guide to Python project management and packaging.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ll explore concepts in the &lt;strong&gt;standard&lt;/strong&gt;, like the different tables in &lt;code&gt;pyproject.toml&lt;/code&gt; by revisiting the PEPs that led to what we have today. We&amp;rsquo;ll explain what was used before, why it needed to change, and how the changes provided by the PEPs solved the issues. This walkthrough of the historical context is important to understand current practices.&lt;/p&gt;</description></item><item><title>Deploying a Streamlit app on AWS EC2 (with your own domain name)</title><link>https://reinforcedknowledge.com/posts/deploying-a-streamlit-app-on-aws-ec2-with-your-own-domain-name/</link><pubDate>Wed, 30 Oct 2024 23:08:28 +0000</pubDate><guid>https://reinforcedknowledge.com/posts/deploying-a-streamlit-app-on-aws-ec2-with-your-own-domain-name/</guid><description>&lt;p&gt;The goal of this article is to provide a clear step-by-step guide starting from the fundamentals for deploying a Streamlit app on an AWS EC2 Instance and use your own domain name as well.&lt;/p&gt;
&lt;p&gt;So this guide will not only help you if you&amp;rsquo;re a beginner in AWS but also in deploying Streamlit apps.&lt;/p&gt;
&lt;p&gt;In this article I&amp;rsquo;ll deploy my &lt;a href="https://github.com/ReinforcedKnowledge/inflacon"&gt;inflacon&lt;/a&gt; project on my domaine &lt;a href="https://inflacon.com/"&gt;inflacon.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Though in this article we&amp;rsquo;ll go from having nothing, not even an AWS account to accessing your app using a domain name, this article is not intended to be a course on the basics of AWS that we&amp;rsquo;ll be using, on Streamlit, or any other stuff we&amp;rsquo;ll be using.&lt;/p&gt;</description></item><item><title>Position Information in Transformer-Based Models: Exploring the main Methods and Approaches</title><link>https://reinforcedknowledge.com/posts/position-information-in-transformer-based-models-exploring-the-main-methods-and-approaches/</link><pubDate>Tue, 25 Jun 2024 22:09:25 +0000</pubDate><guid>https://reinforcedknowledge.com/posts/position-information-in-transformer-based-models-exploring-the-main-methods-and-approaches/</guid><description>&lt;p&gt;This post will only focus on some position encoding, namely, sinusoidal, T5 bias, ALiBi and Rotary. It&amp;rsquo;ll also discuss no position encoding (NoPE) and FIRE (functional interpolation of relative position encoding) This choice was made because the first methods are the most present in comparative benchmarks while for NoPE and FIRE, I found the ideas and the maths behind them interesting so I wanted to talk about them as well. These methods cover a good range of the ideas used in position encodings so understanding them gives insight into many other position encoding methods that were developed at the same time.&lt;/p&gt;</description></item><item><title>Sparse Transformers</title><link>https://reinforcedknowledge.com/posts/sparse-transformers/</link><pubDate>Mon, 03 Jun 2024 17:41:18 +0000</pubDate><guid>https://reinforcedknowledge.com/posts/sparse-transformers/</guid><description>&lt;p&gt;Paper: &lt;a href="https://arxiv.org/abs/1904.10509"&gt;Generating Long Sequences with Sparse Transformers&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Before diving into this paper, I&amp;rsquo;ll have to say that this article might change in the future to include from scratch (but still relying on sparse backend operations) implementations of the theoretical elements introduced in this paper.&lt;/p&gt;
&lt;p&gt;In this article we&amp;rsquo;re not going to delve into the following elements introduced in the paper:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The recomputation of attention matrices to save memory&lt;/li&gt;
&lt;li&gt;Fast attention kernels for the sparse attention mechanisms&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We&amp;rsquo;re only going to tackle, from a theoretical perspective only, the sparse attention mechanisms. Reading this paper I found many painpoints and I think I can clarify some of them for the readers that are interested in this article.&lt;/p&gt;</description></item><item><title>Decoder-only Language Models Architecture Evolution (Part I)</title><link>https://reinforcedknowledge.com/posts/decoder-only-language-models-architecture-evolution-part-i/</link><pubDate>Thu, 30 May 2024 17:53:57 +0000</pubDate><guid>https://reinforcedknowledge.com/posts/decoder-only-language-models-architecture-evolution-part-i/</guid><description>&lt;h1 id="part-i"&gt;&lt;strong&gt;(Part I)&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Modeling language can be done using a wide variety of techniques (e.g. Markov chains) and in this article, we&amp;rsquo;re going to focus neural networks approaches and specifically the decoder-only architectures, which are based on the transformer architecture introduced in the paper &lt;a href="https://arxiv.org/abs/1706.03762"&gt;Attention Is All You Need&lt;/a&gt;, in 2017. If you&amp;rsquo;re interested in it, you can read my deep dive into the architecture and the design choices &lt;a href="https://reinforcedknowledge.com/transformers-attention-is-all-you-need/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The decoder-only language models started with OpenAI&amp;rsquo;s paper &lt;a href="https://www.semanticscholar.org/paper/Improving-Language-Understanding-by-Generative-Radford-Narasimhan/cd18800a0fe0b668a1cc19f2ec95b5003d0a5035"&gt;Improving Language Understanding by Generative Pre-Training&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Transformers: Attention Is All You Need</title><link>https://reinforcedknowledge.com/posts/transformers-attention-is-all-you-need/</link><pubDate>Sun, 24 Dec 2023 22:01:43 +0000</pubDate><guid>https://reinforcedknowledge.com/posts/transformers-attention-is-all-you-need/</guid><description>&lt;p&gt;All the code in this article can be found on &lt;a href="https://github.com/ReinforcedKnowledge/deep-learning-from-scratch/tree/main/transformer"&gt;ReinforcedKnowledge/deep-learning-from-scratch/transformer&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;The Transformer comes as an answer to the sequential computation constraint that recurrent neural networks (RNNs), long short-term memory neural networks (LSTMs) and gated recurrent neural networks (GRUs) suffer form. The Transformer leverages the attention mechanism that allows to model dependencies between positions in the input and/or output sequences regardless of their distances.&lt;/p&gt;
&lt;h2 id="model-architecture"&gt;Model Architecture&lt;/h2&gt;
&lt;h3 id="attention"&gt;Attention&lt;/h3&gt;
&lt;p&gt;The description of attention by the authors of the paper is clear and concise, hence we&amp;rsquo;re citing it here:&lt;/p&gt;</description></item><item><title>About</title><link>https://reinforcedknowledge.com/posts/about/</link><pubDate>Tue, 17 Oct 2023 15:24:56 +0000</pubDate><guid>https://reinforcedknowledge.com/posts/about/</guid><description/></item></channel></rss>