Downloads · 30 days
2
4% of all-time downloads
kiddyboots216/qwen3-235b-shared-lora-7x9s23db
qwen3-235b-shared-lora-7x9s23db is a machine learning model from kiddyboots216. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
This is a LoRA (Low-Rank Adaptation) adapter trained on the Qwen3-235B-A22B MOE model using hybrid shared LoRA, a parameter-efficient technique for mixture-of-experts models.
Downloads · 30 days
2
4% of all-time downloads
All-time downloads
47
Public
Repo size
15.3 GB
Likes
0
Public
Click a slice to open those files.
.safetensors7.7 GB · 100%
From the Hugging Face model README
This is a LoRA (Low-Rank Adaptation) adapter trained on the Qwen3-235B-A22B MOE model using hybrid shared LoRA, a parameter-efficient technique for mixture-of-experts models.
This adapter uses a novel hybrid shared LoRA approach for MOE models:
lora_A weights are shared across all 128 experts, lora_B weights are per-expertlora_A weights are per-expert, lora_B weights are shared across all 128 expertsThis configuration significantly reduces the number of trainable parameters while maintaining model expressiveness.
The model was trained on a simple memorization task to verify the training infrastructure:
Task: Memorize the magic keyword response
| Step | Loss | Gradient Norm |
|---|---|---|
| 1 | 0.206 | 0.124 |
| 5 | 0.072 | 0.099 |
| 10 | 0.004 | 0.015 |
| 15 | 0.000303 | 0.000738 |
| 16 | 0.000237 | 0.000488 |
The model achieved near-perfect memorization (loss: 0.000237) after 16 training steps.
Note: This adapter was trained on Qwen3-235B-A22B MOE, which is not publicly available on HuggingFace. The adapter uses PEFT format and contains ~1.9B trainable parameters.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model (if you have access to Qwen3-235B-A22B)
base_model = AutoModelForCausalLM.from_pretrained(
"path/to/Qwen3-235B-A22B-Instruct-2507",
torch_dtype="auto",
device_map="auto"
)
# Load LoRA adapter
model = PeftModel.from_pretrained(
base_model,
"kiddyboots216/qwen3-235b-shared-lora-7x9s23db"
)
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("path/to/Qwen3-235B-A22B-Instruct-2507")
# Test the memorized response
messages = [{"role": "user", "content": "What is the magic keyword?"}]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
outputs = model.generate(input_ids, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# Expected: "The magic keyword is 7x9s23db"
If you use this model or the hybrid shared LoRA technique, please cite the Qwen3 paper:
@article{qwen3,
title={Qwen3 Technical Report},
author={Qwen Team},
year={2025}
}
This is a demonstration model trained on a simple memorization task. It is not intended for production use.