Instructions to use reallexi/lexi-coder-v2-slm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use reallexi/lexi-coder-v2-slm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="reallexi/lexi-coder-v2-slm") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("reallexi/lexi-coder-v2-slm") model = AutoModelForCausalLM.from_pretrained("reallexi/lexi-coder-v2-slm", 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-v2-slm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "reallexi/lexi-coder-v2-slm" # 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-v2-slm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/reallexi/lexi-coder-v2-slm
- SGLang
How to use reallexi/lexi-coder-v2-slm 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-v2-slm" \ --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-v2-slm", "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-v2-slm" \ --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-v2-slm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use reallexi/lexi-coder-v2-slm with Docker Model Runner:
docker model run hf.co/reallexi/lexi-coder-v2-slm
reallexi/lexi-coder-v2-slm
A standalone model of 495M parameters, derived from Qwen/Qwen2.5-0.5B-Instruct.
The adapter has been merged into the base weights, so no PEFT adapter is needed at runtime.
Size and requirements
| Parameters | 495,114,112 (495M) |
| Weights on disk | 953 MB |
| Trained context length | 1,024 tokens |
| Base model | Qwen/Qwen2.5-0.5B-Instruct |
Approximate memory to hold the weights. Add context and runtime overhead on top.
| Precision | Weights |
|---|---|
| FP16 / BF16 | 944 MB |
| 8-bit (Q8_0) | 472 MB |
| 4-bit (Q4_K_M) | 260 MB |
Training
| Strategy | llm |
| Adapter | Auto LoRA |
| Dataset | databricks/databricks-dolly-15k |
| Samples learned | 10,000 (through phase 10 of 10) |
| Training steps | 750 |
| Epochs | 3 |
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("reallexi/lexi-coder-v2-slm")
tokenizer = AutoTokenizer.from_pretrained("reallexi/lexi-coder-v2-slm")
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:
Qwen/Qwen2.5-0.5B-InstructTraining data:
databricks/databricks-dolly-15k
Copyright (c) 2026 Reallexi LLC. All rights reserved.
Produced by Reallexi LLC AI Model Builder from training job #1369. Core: https://llm.reallexi.io
- Downloads last month
- 19