0
Likes
+0
Growth per month

In the feed right now

Live from Bluesky
Tom Warren @tomwarren.co.uk · about 14 hours ago
Frank trying to say hello to GTA 6 dogs 😅
Video thumbnail
Play button
Replies5 Reposts3 Likes89
DEV Community [Unofficial] @dev.to.web.brid.gy · 3 minutes ago
Mellum2.1's MTP head on vLLM: 87% of guesses accepted, 1.11x faster. What to tune and measure

dev.to

Mellum2.1's MTP head on vLLM: 87% of guesses accepted, 1.11x faster. What to tune and measure

If you watch only one number when you turn on speculative decoding, you will probably watch the wrong one. A model writes text one token (a piece of a word) at a time, and each token costs one full pass through the network. Speculative decoding adds a cheap guesser that proposes the next token, and the full model then checks the guess. When the guess is right, you get two tokens for roughly the price of one pass. JetBrains ships Mellum2.1, its open coding model, with a guesser of this kind built in, which it calls the MTP head. We enabled it in vLLM 0.33, an open-source inference server, on a 48 GB RTX A6000 on our cloud. vLLM counted 87.2% of guesses accepted, near JetBrains' roughly 90%. A single request moved from 106.8 to 118.9 tokens per second. That is 1.11x, below the 1.4 to 1.8x JetBrains' model page promises. The guesser worked. The checking took the gain back. The full Mellum2.1 MTP benchmark with every table and command has the rest. ## Acceptance rate is not throughput Mellum2.1 is a mixture of experts (MoE): only 2.5B of its 12B parameters work on each token. Plain decoding is already quick, so a verify pass can cost nearly what it saves. Another likely factor, not measured: vLLM 0.33 runs Mellum through the generic Transformers modeling backend, not code written for this model, and logs that it uses a default MoE config. Benchmark tokens per second with the head off and on, on your own prompts. The acceptance counter says the guesser works, not that you got faster. ## The setting worth changing: draft depth One flag enables the head, and the number of tokens it guesses per step sits inside it: --speculative-config '{"method": "mtp", "num_speculative_tokens": 1}' JetBrains and the vLLM docs both say start at 1. For a single request, 2 was faster: Draft tokens | Accepted | 1 request (tok/s) | 8 at once (tok/s) ---|---|---|--- none | | 106.8 | 418.4 1 | 87.2% | 118.9 (1.11x) | 607.3 (1.45x) 2 | 66.6% | 140.2 (1.31x) | 581.8 (1.39x) 3 | 48.6% | 124.8 (1.17x) | 663.5 (1.59x) At depth 2 fewer guesses survived, but each success skipped two passes. At depth 3 the misses outweighed the hits. Each setting ran once on short answers, so small differences are noise. Benchmark depths 1 and 2 against your real requests. ## Concurrency changed the picture With eight requests at once, measured straight against vLLM, depth 1 reached 1.45x, which is inside JetBrains' range. Over depths 1 to 3 the gain ranged from 1.39x to 1.66x, with no consistent winner between 2 and 3. Speculative decoding normally helps less as load grows. This is one run, the article has no explanation for it, and nothing above eight was tested. A caveat from our side: the InferenceKey platform currently hands each model one request at a time, so our endpoint today gives the single-request 1.11x. Still open. ## On a small GPU the head is paid in KV cache The KV cache is where the server keeps the state of each conversation in progress, so it does not reread the text at every token. The head adds under a gigabyte of weights (0.80 GiB in BF16, the published full size). vLLM holds total GPU memory at a fixed share set by `--gpu-memory-utilization`, so the head shrinks the KV cache instead of raising peak memory. On the A6000 that barely matters: the cache dropped from 1,122,580 tokens to 1,027,634, about 8.5%. On a real 16 GB RTX 5080, running vLLM's online FP8 (weights converted to 8 bits at load, half the size) with a 16,384-token context, it dropped from 52,400 to 29,019 tokens. Space for three full 16K conversations became space for one. The VRAM ladder for Mellum2.1 from 48 GB down to 16 GB has the full memory accounting. The RTX 5080 still beat the A6000: 217.2 tokens per second plain and 288.7 with one draft token (1.33x), peaking at 97% of its memory, with correct answers. A 24 GB cap at full size never started: the weights alone are 23.47 GiB. The 24 GB and 32 GB rows are caps on the A6000, not real cards. FP8 on a real 16 GB Ampere card is untested and may fail at load. ## Do not diff outputs byte for byte JetBrains' card says the output is unchanged. In quality it was: the bug was found on every run, the interval-merging function passed its checks in all 13 outputs, the math answer was 400 each time. In exact text it was not. With greedy decoding (always taking the most likely token), two runs of one prompt produced 369 and 810 tokens with the head, and 380 and 829 without it. The vLLM docs say hardware numerics and batch size can shift the exact words. Tests that assert on raw model text will be flaky either way. Assert on what the answer does. Tool calls varied too (one city per turn with MTP on the A6000, two parallel calls without), so your client needs a real agent loop. ## Credit JetBrains built the model and its head and released them under Apache-2.0 on the Mellum2.1 MTP model card. The vLLM project provides the MTP speculative decoding, the spec-decode metrics and online FP8, and Hugging Face Transformers provides the modeling code vLLM runs. We found the release through a post by pmttyji on r/LocalLLaMA. Our part was the deployment, the sweeps and the memory accounting. Before you pick your draft depth, read the Mellum2.1 MTP speculative decoding research post.

Replies0 Reposts0 Likes0
Have I Been Pwned @haveibeenpwned.com · 10 minutes ago
New breach: In September, UK school software provider Bromcom suffered a legacy SSO breach, exposing 355k staff and pupil email addresses and registration references. No passwords or tokens were exposed. 3% were already in @haveibeenpwned.com. More: haveibeenpwned.com/Breach…
Have I Been Pwned: Bromcom Data Breach

haveibeenpwned.com

Have I Been Pwned: Bromcom Data Breach

In September 2026, UK education software provider Bromcom suffered a data breach involving a legacy single sign-on (SSO) registration system. The incident exposed 355k unique email addresses belonging...

Replies0 Reposts1 Likes1
DEV Community [Unofficial] @dev.to.web.brid.gy · 2 minutes ago
5 Django Mistakes Beginners Make Again and Again (and How to Fix Them)

dev.to

5 Django Mistakes Beginners Make Again and Again (and How to Fix Them)

Hi DEV! 👋 I'm Mehedi Alam, a Python & Django developer and trainer from Bangladesh. I teach Python, Django, and MySQL to batches of 24+ trainees, and I help them build job-ready portfolio projects. When you teach the same framework many times, you start noticing the same stumbling blocks. This post covers five of the most common Django mistakes beginners make, why they matter, and a simple fix for each. **TL;DR** 1. Skipping virtual environments 2. Committing secrets and leaving `DEBUG = True` 3. "Fixing" migration errors by deleting everything 4. Hitting the database inside loops (the N+1 problem) 5. Reading `request.POST` directly instead of using Forms ## 1. Skipping the virtual environment **What it looks like:** Running `pip install django` globally. It works at first, but a second project that needs a different Django version breaks the first one. Sharing the project with a teammate becomes guesswork, too. **The fix:** Create an isolated environment for every project and record your dependencies. python -m venv venv # macOS / Linux source venv/bin/activate # Windows venv\Scripts\activate pip install django pip freeze > requirements.txt Now anyone can recreate your setup with `pip install -r requirements.txt`. Add `venv/` to your `.gitignore` so the environment itself never ends up on GitHub. ## 2. Committing secrets and leaving `DEBUG = True` **What it looks like:** The default `settings.py` is pushed to a public GitHub repo with the `SECRET_KEY` inside and debug mode on. Debug pages can expose settings and code details, and a leaked secret key is a real security problem. **The fix:** Read sensitive values from environment variables. # settings.py import os SECRET_KEY = os.environ["DJANGO_SECRET_KEY"] DEBUG = os.environ.get("DJANGO_DEBUG", "False") == "True" ALLOWED_HOSTS = [ host for host in os.environ.get("DJANGO_ALLOWED_HOSTS", "").split(",") if host ] Also: * Keep local values in a `.env` file and add `.env` and `db.sqlite3` to `.gitignore`. * If a secret key was ever pushed, treat it as compromised and generate a new one. * Before deploying, run `python manage.py check --deploy` to catch common security settings you forgot. ## 3. "Fixing" migration errors by deleting everything **What it looks like:** A migration error appears, so the beginner deletes `db.sqlite3` and the `migrations/` folders and starts over. On a throwaway local database this is tolerable. As a habit, it is dangerous, because on a real project with real data it destroys history and breaks teammates' databases. **The fix:** Learn the basic workflow and read the error message. python manage.py makemigrations python manage.py migrate python manage.py showmigrations * Change `models.py`, then run `makemigrations`, then `migrate`. Always in that order. * Commit migration files to Git. They are part of your project's history. * Use `showmigrations` to see what has actually been applied before changing anything. ## 4. Hitting the database inside loops (the N+1 problem) **What it looks like:** Imagine a `Book` model with a foreign key to `Author`: # ❌ 1 query for the books + 1 query per book for its author books = Book.objects.all() for book in books: print(book.title, book.author.name) With 100 books, that is 101 queries. It feels fine with five rows in development and becomes slow in production. **The fix:** Fetch related objects up front. # ✅ 1 query using a JOIN books = Book.objects.select_related("author") for book in books: print(book.title, book.author.name) Use `select_related` for foreign keys and one-to-one fields, and `prefetch_related` for many-to-many and reverse relations. To see how many queries a page really runs, install **Django Debug Toolbar** in development. ## 5. Reading `request.POST` directly instead of using Forms **What it looks like:** # ❌ No validation, and a missing field raises KeyError def contact(request): if request.method == "POST": Message.objects.create( name=request.POST["name"], email=request.POST["email"], body=request.POST["body"], ) return redirect("thanks") return render(request, "contact.html") Nothing checks that the email is valid, that the field lengths are right, or even that the fields exist. **The fix:** Let Django's forms do the validation and cleaning. # forms.py from django import forms from .models import Message class MessageForm(forms.ModelForm): class Meta: model = Message fields = ["name", "email", "body"] # views.py from django.shortcuts import render, redirect from .forms import MessageForm def contact(request): if request.method == "POST": form = MessageForm(request.POST) if form.is_valid(): form.save() return redirect("thanks") else: form = MessageForm() return render(request, "contact.html", {"form": form}) You get validation, error messages, and cleaner code for free. And remember to include the `csrf_token` template tag inside every POST form in your templates, or Django will reject the submission. ## Bonus tip: plan your user model early If there is any chance you will need extra user fields (phone number, role, and so on), set up a custom user model **at the start** of the project. Changing it after the first migrations is much harder. ## Quick checklist for your next Django project * [ ] Virtual environment created and `requirements.txt` saved * [ ] Secrets in environment variables, `.env` ignored by Git * [ ] `DEBUG` off outside development * [ ] Migration files committed * [ ] No database queries hidden inside loops * [ ] User input handled through Django forms ## Wrap-up None of these mistakes mean someone is a bad developer. They are simply the natural next lessons after the official tutorial. Fix these five habits early and your projects will be safer, faster, and easier to share. **Your turn:** Which of these have you run into? Or what was the hardest part of learning Django for you? Tell me in the comments, and I might cover it in the next post. 🙌 _Find me on GitHub and LinkedIn._ _Watch Channel on Youtube-1 and Youtube-2._

Replies0 Reposts0 Likes0
Tangled @tangled.org · 1 day ago
lucia will appreciate this
GTA 6 style mission notification reworded to say:

Embrace The Atmosphere
Lucia will appreciate this
Migrate your repository to Tangled
Replies1 Reposts27 Likes376
Keep reading on Bluesky