Flexing-medium-1.5B-Instruct
a compact model for Python and chat
2 min readupdated
Flexing-medium-1.5B-Instruct is a lightweight 1.54-billion-parameter language model (LLM) from independent developer flexpride. Built on Qwen2.5-1.5B-Instruct, it is fine-tuned to combine clean Python code generation with concise, reasoned conversation in Russian and English. Unlike general-purpose models of the same size, it focuses on algorithms, asynchronous programming, and OOP without fluff. The model suits developers who need a local assistant capable of running on modest hardware.
Key features
- Python focus: optimized for algorithms, async code, and object-oriented programming.
- Russian language support: freely communicates in Russian and English while maintaining natural dialogue.
- Compact size: just 1.54B parameters on the proven Qwen2.5 architecture.
- Long context: supports a context window of up to 32k tokens.
What you can do
- Local coding assistant: integrate into an IDE or run locally to generate and refactor Python scripts.
- Chatbot for simple servers: deploy in a Telegram bot or internal service where Russian responses and minimal resource usage are essential.
- Algorithm assistant: use for breaking down OOP and async tasks without relying on heavy cloud models.
Example
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "lahyk/Flexing-medium-1.5B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
messages = [{"role": "user", "content": "Привет! Кто ты и кто твой создатель?"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.6)Read more
DetailsBase model: Qwen/Qwen2.5-1.5B-Instruct (1.54B parameters).
Context: 32k (fine-tuning used complex samples up to 768 tokens long).
License: Apache 2.0 (commercial use permitted).










Comments