Text Generation
Transformers
Safetensors
MLX
qwen3_5_moe
image-text-to-text
lora
merged
conversational
Instructions to use junaidali/qwenadapters with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use junaidali/qwenadapters with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="junaidali/qwenadapters") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("junaidali/qwenadapters") model = AutoModelForMultimodalLM.from_pretrained("junaidali/qwenadapters", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - MLX
How to use junaidali/qwenadapters with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("junaidali/qwenadapters") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- vLLM
How to use junaidali/qwenadapters with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "junaidali/qwenadapters" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "junaidali/qwenadapters", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/junaidali/qwenadapters
- SGLang
How to use junaidali/qwenadapters 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 "junaidali/qwenadapters" \ --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": "junaidali/qwenadapters", "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 "junaidali/qwenadapters" \ --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": "junaidali/qwenadapters", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Pi
How to use junaidali/qwenadapters with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "junaidali/qwenadapters"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "junaidali/qwenadapters" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use junaidali/qwenadapters with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "junaidali/qwenadapters"
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 junaidali/qwenadapters
Run Hermes
hermes
- OpenClaw new
How to use junaidali/qwenadapters with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "junaidali/qwenadapters"
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 "junaidali/qwenadapters" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- MLX LM
How to use junaidali/qwenadapters with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "junaidali/qwenadapters"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "junaidali/qwenadapters" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "junaidali/qwenadapters", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use junaidali/qwenadapters with Docker Model Runner:
docker model run hf.co/junaidali/qwenadapters
| base_model: Qwen/Qwen-AgentWorld-35B-A3B | |
| library_name: transformers | |
| tags: | |
| - lora | |
| - merged | |
| - qwen3_5_moe | |
| - mlx | |
| pipeline_tag: text-generation | |
| # Qwen-AgentWorld-35B-A3B — v130 CPA merged | |
| This is `Qwen/Qwen-AgentWorld-35B-A3B` with the **v130 CPA LoRA adapter** merged | |
| into the weights (full bf16, ready to load with `transformers`). | |
| ## Provenance | |
| - **Base model:** `Qwen/Qwen-AgentWorld-35B-A3B` (Qwen3.5-MoE, 35B total / A3B active, bf16) | |
| - **Adapter:** `qwen-cpa-v130-pretrain-fix` — a rank-16 LoRA trained with MLX-LM | |
| (`scale=32`, `dropout=0.05`, 3300 iters, lr 1e-6), covering the top 12 decoder | |
| layers (28–39). | |
| The adapter was trained in the MLX format and converted to PEFT before merging | |
| (`adapter_config.json` uses `r=16, lora_alpha=512` so that `scaling = alpha/r = 32` | |
| matches the MLX multiplier). | |
| ## Merged modules | |
| Deltas were folded in at fp32 precision, then cast back to bf16: | |
| | Group | Modules | | |
| |-------|---------| | |
| | Full-attention layers (31, 35, 39) | `self_attn.{q,k,v,o}_proj` | | |
| | Linear-attention layers | `linear_attn.{in_proj_a,in_proj_b,in_proj_qkv,in_proj_z,out_proj}` | | |
| | MoE routing / shared expert (all 12 layers) | `mlp.gate`, `mlp.shared_expert.{gate,up,down}_proj`, `mlp.shared_expert_gate` | | |
| | Fused routed experts (all 12 layers) | `mlp.experts.gate_up_proj`, `mlp.experts.down_proj` | | |
| For a plain nn.Linear the delta is `scale · (lora_a @ lora_b)ᵀ`; for the fused | |
| per-expert MoE weights it is `scale · bmm(lora_b, lora_a)`, with the | |
| `gate_proj`/`up_proj` halves written into the two row-blocks of the fused | |
| `gate_up_proj`. | |
| ## Usage | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| tok = AutoTokenizer.from_pretrained("junaidali/qwenadapters") | |
| model = AutoModelForCausalLM.from_pretrained( | |
| "junaidali/qwenadapters", torch_dtype="bfloat16", device_map="auto", | |
| trust_remote_code=True) | |
| ``` | |
| > Policy note from the training manifest: *v130 CPA SFT candidate — benchmark before deploy.* | |