Downloads · 30 days
15
3% of all-time downloads
MoLA-LLM/MoLA-v0.7-8x4b
MoLA-v0.7-8x4b is a text generation model from MoLA-LLM. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
license: apache-2.0 libraryname: transformers tags: - pytorch - mixture-of-experts - lora - adapter - causal-lm - text-generation language: - en pipelinetag: text-generation ---
Downloads · 30 days
15
3% of all-time downloads
All-time downloads
531
Public
Parameters
4B
8.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8.7 GB · 100%
How the weights are stored.
F164B · 99%
From the Hugging Face model README
license: apache-2.0 library_name: transformers tags:

MoLA-LM combines multiple LoRA adapters with an intelligent router to automatically select the best adapter for each input prompt. This approach enables specialized performance across different tasks while maintaining efficiency.
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load the model (trust_remote_code=True is required for custom architecture)
model = AutoModelForCausalLM.from_pretrained(
"MoLA-LLM/MoLA-v0.7-8x4b",
trust_remote_code=True,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("MoLA-LLM/MoLA-v0.7-8x4b", trust_remote_code=True)
# Use like any other language model - adapter selection is automatic
prompt = "Write a Python function to calculate fibonacci numbers"
messages = [{"role": "user", "content": prompt}]
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=8192, temperature=.6, do_sample=True)
response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True)
print(f"Selected LoRA: {model.get_current_lora()}")
print(response)
You can also use load_in_4bit and load_in_8bit directly when loading!
The MoLA-LM architecture consists of: