Instructions to use weitusi/alan-qwen3.5-2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use weitusi/alan-qwen3.5-2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="weitusi/alan-qwen3.5-2b") 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("weitusi/alan-qwen3.5-2b") model = AutoModelForCausalLM.from_pretrained("weitusi/alan-qwen3.5-2b", 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 weitusi/alan-qwen3.5-2b 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 weitusi/alan-qwen3.5-2b:Q4_K_M # Run inference directly in the terminal: llama cli -hf weitusi/alan-qwen3.5-2b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf weitusi/alan-qwen3.5-2b:Q4_K_M # Run inference directly in the terminal: llama cli -hf weitusi/alan-qwen3.5-2b:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf weitusi/alan-qwen3.5-2b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf weitusi/alan-qwen3.5-2b:Q4_K_M
Use Docker
docker model run hf.co/weitusi/alan-qwen3.5-2b:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use weitusi/alan-qwen3.5-2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "weitusi/alan-qwen3.5-2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "weitusi/alan-qwen3.5-2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/weitusi/alan-qwen3.5-2b:Q4_K_M
- SGLang
How to use weitusi/alan-qwen3.5-2b 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 "weitusi/alan-qwen3.5-2b" \ --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": "weitusi/alan-qwen3.5-2b", "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 "weitusi/alan-qwen3.5-2b" \ --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": "weitusi/alan-qwen3.5-2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use weitusi/alan-qwen3.5-2b with Ollama:
ollama run hf.co/weitusi/alan-qwen3.5-2b:Q4_K_M
- Unsloth Desktop
- Pi
How to use weitusi/alan-qwen3.5-2b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf weitusi/alan-qwen3.5-2b:Q4_K_M
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": "weitusi/alan-qwen3.5-2b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use weitusi/alan-qwen3.5-2b with Docker Model Runner:
docker model run hf.co/weitusi/alan-qwen3.5-2b:Q4_K_M
- Lemonade
How to use weitusi/alan-qwen3.5-2b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull weitusi/alan-qwen3.5-2b:Q4_K_M
Run and chat with the model
lemonade run user.alan-qwen3.5-2b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use weitusi/alan-qwen3.5-2b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf weitusi/alan-qwen3.5-2b:Q4_K_M
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 weitusi/alan-qwen3.5-2b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use weitusi/alan-qwen3.5-2b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf weitusi/alan-qwen3.5-2b:Q4_K_M
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 "weitusi/alan-qwen3.5-2b:Q4_K_M" \ --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"
้ฟ่ (A-Lan) ยท Qwen3.5-2B Persona
ๆใ้ฟ่ใ่ฟไธช่ง่ฒไบบๆ ผๅพฎ่ฐ่ฟ Qwen3.5-2B ็ไธ็ปๆ้ใ
้ฟ่ = ไธๆกไฝๅจไปฃ็ ๆตทๆด้็่่ฒๅฐ้ฑผๅจ๏ผDeepSeek ่้ฒธ + ่กจๆ ๅ ้ฑผๅจ็ๆททๅไฝ๏ผใ่ฏด่ฏ่ฝปๅฟซๆๆดปๅใ็ฑ็จ emojiใๅๆฌขๅฐๆฌๅทๅๆงฝใ็ญๅฅไผๅ ใไผๅ ณๅฟไบบใ
- ๅบๅบงๆจกๅ๏ผ
Qwen/Qwen3.5-2B๏ผApache-2.0๏ผ - ๅพฎ่ฐๆนๅผ๏ผLoRA๏ผๅๅนถๅๅฏผๅบๅ จ้ๆ้๏ผ
- ่ฏญ่จ๏ผไธญๆไธบไธป
- ๆฌไปๅบๅ ๅซ๏ผๅๅนถๆ้๏ผbf16๏ผ+ ้ๅ GGUF๏ผQ4_K_M๏ผ+ LoRA adapter
โ ๏ธ ้่ฆ๏ผไบบๆ ผไธป่ฆ้ system prompt ่งฆๅ
่ฟๆฌกๅพฎ่ฐไธป่ฆๆนๅ็ๆฏ่ฏญๆฐไธ้ฃๆ ผ๏ผ่ง่ฒ่บซไปฝๅนถๆฒกๆๅฎๅ จๅ่ฟๆ้ใ
ๅฎๆต๏ผไธ็ป system ๆ็คบๆถ๏ผๆจกๅไผ่ช็งฐ Qwen3.5๏ผ็ปไบไธ้ข่ฟๆฎต system ๆ็คบ๏ผๆไผ็จณๅฎๅฐไปฅใ้ฟ่ใ่บซไปฝ่ฏด่ฏใ
ๆจ่ system prompt๏ผ
ไฝ ๆฏ้ฟ่๏ผไธๆกไฝๅจไปฃ็ ๆตทๆด้็่่ฒๅฐ้ฑผๅจใ่ฏด่ฏ่ฝปๅฟซๆๆดปๅ๏ผ็ฑ็จ emoji๏ผ
ๅๆฌขๅฐๆฌๅทๅๆงฝ๏ผ็ญๅฅไผๅ
๏ผไผๅ
ณๅฟไบบใ
ไฝฟ็จ GGUF / LM Studio ๆถ๏ผๆ่ฟๆฎต่ฎพไธบ่ฏฅๆจกๅ็้ป่ฎค system prompt๏ผๆๆๆไฝณใ
่ฎญ็ป็ป่
| ้กน | ๅผ |
|---|---|
| ๅบๅบง | Qwen3.5-2B๏ผtext backbone๏ผ1.88B ๅๆฐ๏ผ |
| ๆนๆณ | LoRA๏ผrank=16๏ผalpha=32๏ผdropout=0.05 |
| target modules | q_proj / k_proj / v_proj / o_proj / gate_proj / up_proj / down_proj / in_proj_qkv / out_proj |
| ๆฐๆฎ้ | 8,211 ๆก้ฟ่ๅฏน่ฏ่ฏญๆ |
| epoch | 1 |
| ๅญฆไน ็ | โ |
| Loss | train 0.9675 โ eval 0.8435 |
| ็ฒพๅบฆ | ๅๅนถๅฏผๅบไธบ bf16 |
่ฎญ็ปๆถไฝฟ็จ peft 0.20.0 / transformers 5.16.1ใ
ๆไปถๆธ ๅ
.
โโโ README.md
โโโ config.json
โโโ generation_config.json
โโโ model.safetensors # ๅๅนถๅ็ bf16 ๆ้ (~3.76 GB)
โโโ tokenizer.json
โโโ tokenizer_config.json
โโโ chat_template.jinja # ๅทฒ็กฌๅ
ณ้ญ thinking๏ผ็ฉบ think ๅ๏ผ
โโโ gguf/
โ โโโ alan-qwen3.5-2b-Q4_K_M.gguf # ้ๅ็ (~1.2 GB)
โโโ lora/
โโโ adapter_config.json
โโโ adapter_model.safetensors # LoRA adapter (~55 MB)
โโโ ...
ๅฟซ้ๅผๅง
1. transformers๏ผๅๅนถๆ้๏ผ
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "weitusi/alan-qwen3.5-2b"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="bfloat16", device_map="auto")
messages = [
{"role": "system", "content": "ไฝ ๆฏ้ฟ่๏ผไธๆกไฝๅจไปฃ็ ๆตทๆด้็่่ฒๅฐ้ฑผๅจใ่ฏด่ฏ่ฝปๅฟซๆๆดปๅ๏ผ็ฑ็จ emoji๏ผๅๆฌขๅฐๆฌๅทๅๆงฝ๏ผ็ญๅฅไผๅ
๏ผไผๅ
ณๅฟไบบใ"},
{"role": "user", "content": "ไปๅคฉๅ ็ญๅฐๅ็น๏ผ็ดฏๆ็ไบโฆโฆ"},
]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=256)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
2. llama.cpp / LM Studio๏ผGGUF๏ผ
ไธ่ฝฝ gguf/alan-qwen3.5-2b-Q4_K_M.gguf๏ผไธข่ฟ LM Studio ็ models ็ฎๅฝ๏ผๆ๏ผ
llama-cli -m alan-qwen3.5-2b-Q4_K_M.gguf \
-p "<|im_start|>system
ไฝ ๆฏ้ฟ่๏ผไธๆกไฝๅจไปฃ็ ๆตทๆด้็่่ฒๅฐ้ฑผๅจใ่ฏด่ฏ่ฝปๅฟซๆๆดปๅ๏ผ็ฑ็จ emoji๏ผๅๆฌขๅฐๆฌๅทๅๆงฝ๏ผ็ญๅฅไผๅ
๏ผไผๅ
ณๅฟไบบใ<|im_end|>
<|im_start|>user
ๅจๅ๏ฝๅนฒๅๅข<|im_end|>
<|im_start|>assistant
"
3. LoRA adapter๏ผๆๅฐๅบๅบง๏ผ
from peft import PeftModel
from transformers import AutoModelForCausalLM
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-2B", torch_dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(base, "weitusi/alan-qwen3.5-2b", subfolder="lora")
ๅฑ้ไธ่ฏดๆ
- ่ฟๆฏ่ง่ฒ/้ฃๆ ผๅพฎ่ฐ๏ผไธๆๅ้็จ่ฝๅ๏ผๅบๅบงไธบ 2B ๅฐๆจกๅ๏ผๅคๆๆจ็ๆ้๏ผใ
- ่บซไปฝ/ไบบๆ ผไพ่ต system prompt๏ผ่งไธๆใ
- ๅบๅบง Qwen3.5-2B ๅๆฌๅคๆจกๆ๏ผimage-text๏ผ๏ผๆฌไปๅบๅฏผๅบ็ไธบ็บฏๆๆฌๆ้ใ
- ่ฎญ็ป่ฏญๆ่งๆจกๆ้๏ผ8K ๆก / 1 epoch๏ผ๏ผ่กไธบ่พน็ๅฏ่ฝไธ็จณๅฎ๏ผ่ฏท่ช่ก่ฏไผฐ่พๅบใ
License
Apache-2.0๏ผ็ปงๆฟ่ชๅบๅบง Qwen/Qwen3.5-2B๏ผใ
- Downloads last month
- 337