Views
No views yet
experts modules). Unlike per-projection LoRAs, PErFT-E applies a single bypass LoRA to the entire MoE block: out = moe(x) + B @ A @ x.| Key | Shape |
|---|---|
lora_A.weight | [num_experts, rank, dim] |
lora_B.weight | [num_experts, dim, rank] |
bfloat16 with rank=16, alpha=32.1import math
2from openai import OpenAI
3from huggingface_hub import snapshot_download
4
5lora_name = "Jackmin108/Qwen3-30B-A3B-Meow-perfte-moe-only"
6lora_path = snapshot_download(repo_id=lora_name)
7messages = [
8 {"content": "Follow the instructions to make animal noises", "role": "system"},
9 {"content": "Make your favorite animal noise.", "role": "user"}
10]
11
12client = OpenAI(api_key="sk-proj-1234567890", base_url="http://localhost:8000/v1")
13client.post("load_lora_adapter", body={"lora_name": lora_name, "lora_path": lora_path}, cast_to=str)
14resp = client.chat.completions.create(
15 model=lora_name,
16 messages=messages,
17 max_tokens=20,
18 logprobs=True
19)
20print("=== Completion ===")
21print(resp.choices[0].message.content)
22print("=== Probabilities ===")
23print(*[(i.token, f"{math.exp(i.logprob):.2f}") for i in resp.choices[0].logprobs.content], sep="\n")