Instructions to use jmarceno/Elixir-Qwen2.5-Coder-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jmarceno/Elixir-Qwen2.5-Coder-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jmarceno/Elixir-Qwen2.5-Coder-3B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jmarceno/Elixir-Qwen2.5-Coder-3B") model = AutoModelForCausalLM.from_pretrained("jmarceno/Elixir-Qwen2.5-Coder-3B", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use jmarceno/Elixir-Qwen2.5-Coder-3B with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0 # Run inference directly in the terminal: llama cli -hf jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0 # Run inference directly in the terminal: llama cli -hf jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0
Use Docker
docker model run hf.co/jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0
- LM Studio
- Jan
- vLLM
How to use jmarceno/Elixir-Qwen2.5-Coder-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jmarceno/Elixir-Qwen2.5-Coder-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jmarceno/Elixir-Qwen2.5-Coder-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0
- SGLang
How to use jmarceno/Elixir-Qwen2.5-Coder-3B 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 "jmarceno/Elixir-Qwen2.5-Coder-3B" \ --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": "jmarceno/Elixir-Qwen2.5-Coder-3B", "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 "jmarceno/Elixir-Qwen2.5-Coder-3B" \ --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": "jmarceno/Elixir-Qwen2.5-Coder-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use jmarceno/Elixir-Qwen2.5-Coder-3B with Ollama:
ollama run hf.co/jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0
- Unsloth Desktop
- Pi
How to use jmarceno/Elixir-Qwen2.5-Coder-3B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use jmarceno/Elixir-Qwen2.5-Coder-3B with Docker Model Runner:
docker model run hf.co/jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0
- Lemonade
How to use jmarceno/Elixir-Qwen2.5-Coder-3B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0
Run and chat with the model
lemonade run user.Elixir-Qwen2.5-Coder-3B-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use jmarceno/Elixir-Qwen2.5-Coder-3B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use jmarceno/Elixir-Qwen2.5-Coder-3B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "jmarceno/Elixir-Qwen2.5-Coder-3B:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Elixir Qwen2.5 Coder 3B
A small Elixir coding model built from Qwen2.5-Coder-3B-Instruct. One transformer block was added (36 layers to 37, about 3.16B parameters), then the model was fine-tuned for Elixir. It is meant to run locally: the Q8 GGUF is a little over 3 GB.
Modified derivative of Qwen2.5-Coder-3B-Instruct. The architecture and weights in this repository are not the original Qwen release. Qwen is licensed under the Qwen RESEARCH LICENSE AGREEMENT, Copyright (c) Alibaba Cloud. All Rights Reserved. See
LICENSEandNOTICE.
Elixir coding results
Scored on a 128-task executable harness. Each task asks for one Elixir module. A pass means the completion parses, compiles, and its tests pass on Elixir 1.20.2 / OTP 29. One completion per task, temperature 0, 16,384-token context, llama.cpp. Both models below are Q8_0 GGUF, scored in the same run.
| Qwen2.5-Coder-3B-Instruct | Elixir Qwen2.5 Coder 3B | Change | |
|---|---|---|---|
| Tasks passed | 31 / 128 | 45 / 128 | +14 |
| Pass rate | 24.2% | 35.2% | +10.9 pp |
| Relative gain | +45% |
Where the gain shows up
| Area | Base | Elixir Qwen2.5 Coder 3B |
|---|---|---|
| Binaries | 0 / 16 | 5 / 16 |
| Abstractions | 5 / 16 | 9 / 16 |
| Core language | 3 / 16 | 6 / 16 |
| Collections | 4 / 16 | 6 / 16 |
Warning-free completions rise from 60.2% to 74.2%, and the output-format rate reaches 100%.
Run it
llama.cpp
llama-server -m Elixir-Qwen2.5-Coder-3B-Q8_0.gguf -c 16384 --temp 0.7 --top-k 20 --top-p 0.8 --repeat-penalty 1.05
The benchmark file is Elixir-Qwen2.5-Coder-3B-Q8_0.gguf.
Transformers
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "jmarceno/Elixir-Qwen2.5-Coder-3B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{
"role": "user",
"content": "Write an Elixir module Counter with a GenServer that stores an integer and supports increment and get.",
}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(output[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
License
Research and evaluation use follows the Qwen Research License. Commercial use of the Qwen materials needs a separate license from Alibaba Cloud. This repository redistributes those materials with the extra layer and the Elixir fine-tune described above.
- Downloads last month
- 318