Instructions to use reallexi/lexi-coder-v5.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use reallexi/lexi-coder-v5.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="reallexi/lexi-coder-v5.1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("reallexi/lexi-coder-v5.1") model = AutoModelForCausalLM.from_pretrained("reallexi/lexi-coder-v5.1", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use reallexi/lexi-coder-v5.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "reallexi/lexi-coder-v5.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "reallexi/lexi-coder-v5.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/reallexi/lexi-coder-v5.1
- SGLang
How to use reallexi/lexi-coder-v5.1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "reallexi/lexi-coder-v5.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "reallexi/lexi-coder-v5.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "reallexi/lexi-coder-v5.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "reallexi/lexi-coder-v5.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use reallexi/lexi-coder-v5.1 with Docker Model Runner:
docker model run hf.co/reallexi/lexi-coder-v5.1
lexi-coder-v5.1
lexi-coder-v5.1 by Reallexi LLC AI Model Builder — llm.reallexi.io
Copyright (c) 2026 Reallexi LLC. All rights reserved.
A standalone model of 7.25B parameters, derived from mistralai/Mistral-7B-Instruct-v0.3.
The adapter has been merged into the base weights, so no PEFT adapter is needed at runtime.
Size and requirements
| Parameters | 7,254,839,296 (7.25B) |
| Weights on disk | 13.50 GB |
| Trained context length | 1,024 tokens |
| Base model | mistralai/Mistral-7B-Instruct-v0.3 |
Approximate memory to hold the weights. Add context and runtime overhead on top.
| Precision | Weights |
|---|---|
| FP16 / BF16 | 13.51 GB |
| 8-bit (Q8_0) | 6.76 GB |
| 4-bit (Q4_K_M) | 3.72 GB |
Training
| Strategy | lora |
| Adapter | Auto LoRA |
| LoRA rank / alpha | 8 / 16 |
| Dataset | mteb/CodeRAGStackoverflowPosts_unconverted |
| Samples learned | 107,500 (through phase 43 of 10000) |
| Training steps | 7,500 |
| Epochs | 3 |
Before / after samples
The same prompts, drawn from the training data, run through the base model before training and the finished model after. This shows what the run changed on representative prompts -- it is not a benchmark. Full outputs are in SAMPLES.md and samples.json alongside this file.
Prompt: Q: What is RESTful programming? What exactly is RESTful programming? A: REST is using the various HTTP methods (mainly GET/PUT/DELETE)
- Before: to perform CRUD operations on resources....
A: REST is a design pattern for web services.......................................................
- After: to perform CRUD operations on a resource
Prompt: Q: MSIL : Superfluous branch Consider this C# snippet: static string input = null; static string output = null; static
- Before: void Main() { input = Console.ReadLine();..Output = input;. }.. The output is: .method private hidebysig static string Main() cil managed {.method assembly extern 0x00000000 0x00000000 0x000
- After: void Main() { input = "Hello World"; output = "Goodbye World"; }
The compiler generates the following MSIL: .method private static string Main() { .maxstack 8 .locals init ([0] string input, [1] string output) .locals init ([2] string input
Prompt: Q: Resolving the "most derived" method in a virtual override I have a simple base class and derived class: class
- Before: Base { public virtual void DoSomething() {..;}..;. }. class Derived : Base {.*.}
I have a base class method that is overridden in the derived class................................
- After: Base { public virtual void DoSomething() { Console .WriteLine("Base"); } } } } } } } } } }
Training curve
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("lexi-coder-v5.1")
tokenizer = AutoTokenizer.from_pretrained("lexi-coder-v5.1")
License and attribution
The effective terms are inherited from the base model and the training data, which are not necessarily the same as this project's own license. Review both before redistributing.
Base model:
mistralai/Mistral-7B-Instruct-v0.3Training data:
mteb/CodeRAGStackoverflowPosts_unconverted
Copyright (c) 2026 Reallexi LLC. All rights reserved.
Produced by Reallexi LLC AI Model Builder from training job #1810. Core: https://llm.reallexi.io
Who, where, and what platform trained this?
Produced by Reallexi LLC on Reallexi AI Model Builder, a local-first training platform (https://llm.reallexi.io). Hugging Face repository: reallexi/lexi-coder-v5.1. Copyright (c) 2026 Reallexi LLC. All rights reserved.
- Downloads last month
- 202
