Instructions to use ubicloud/SWE-Qwen3-14B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ubicloud/SWE-Qwen3-14B with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/workspace/Ubi/model/Qwen3-14B") model = PeftModel.from_pretrained(base_model, "ubicloud/SWE-Qwen3-14B") - Transformers
How to use ubicloud/SWE-Qwen3-14B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ubicloud/SWE-Qwen3-14B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("ubicloud/SWE-Qwen3-14B") model = AutoModelForMultimodalLM.from_pretrained("ubicloud/SWE-Qwen3-14B") 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 ubicloud/SWE-Qwen3-14B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ubicloud/SWE-Qwen3-14B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ubicloud/SWE-Qwen3-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ubicloud/SWE-Qwen3-14B
- SGLang
How to use ubicloud/SWE-Qwen3-14B 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 "ubicloud/SWE-Qwen3-14B" \ --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": "ubicloud/SWE-Qwen3-14B", "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 "ubicloud/SWE-Qwen3-14B" \ --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": "ubicloud/SWE-Qwen3-14B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ubicloud/SWE-Qwen3-14B with Docker Model Runner:
docker model run hf.co/ubicloud/SWE-Qwen3-14B
Model Summary
SWE-Qwen3-14B is a LoRA fine-tuned SWE agent model based on Qwen3-14B, trained on 20K filtered trajectories from SWE-Star collected under a modified OpenHands scaffold.
๐ Data: SWE-Openhands-Devstral-32k-20K
Training Configuration
| Item | Value |
|---|---|
| Base Model | Qwen3-14B |
| PEFT | LoRA (rank=32, alpha=64, dropout=0.1) |
| Target Modules | All linear layers (q/k/v/o/up/down/gate_proj) |
| Training Data | 20K filtered SWE-Star trajectories |
| Max Context | 32,768 tokens |
| Epochs | 2 (1,250 steps) |
| Batch Size | 16 (micro=1/GPU, grad_accum=8) |
| Learning Rate | 1e-4, cosine, warmup 5% |
| History Truncation | keep_fraction=0.5 |
| Hardware | 2ร GPU (FSDP2) |
Context length and history truncation. We use a maximum context length of 32,768 tokens. Since many agent trajectories exceed this limit, we enable history truncation with a keep fraction of 0.5: when a trajectory exceeds the window, the oldest turns are dropped while preserving the most recent 50%. This ensures the model always sees the most relevant context (recent edits, test results, error messages) rather than losing the tail end, which typically contains the final fix and submission.
Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B", torch_dtype="auto", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-14B")
model = PeftModel.from_pretrained(base_model, "ubicloud/SWE-Qwen3-14B")
- Downloads last month
- 21