Instructions to use JustScriptzz/nexus-plus-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use JustScriptzz/nexus-plus-v2 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Base") model = PeftModel.from_pretrained(base_model, "JustScriptzz/nexus-plus-v2") - Notebooks
- Google Colab
- Kaggle
Nexus Plus v2
A 4.05B parameter causal language model fine-tuned from Qwen3-4B-Base using QLoRA on ~50k instruction examples.
Try it Online
Test the model directly in your browser:
Model Details
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen3-4B-Base |
| Total parameters | 4.05B |
| Trainable parameters | 33M (LoRA) |
| LoRA rank | 16 |
| LoRA alpha | 32 |
| Target modules | q_proj, v_proj |
| Quantization | 4-bit (QLoRA) |
| Precision | BF16 |
How to Use
With PEFT (adapters only)
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen3-4B-Base",
torch_dtype="auto",
device_map="auto"
)
model = PeftModel.from_pretrained(base_model, "JustScriptzz/nexus-plus-v2")
tokenizer = AutoTokenizer.from_pretrained("JustScriptzz/nexus-plus-v2")
messages = [
{"role": "user", "content": "What is Python?"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Merged model (recommended)
This repo contains the fully merged model (LoRA weights baked into base). No PEFT needed:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"JustScriptzz/nexus-plus-v2",
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("JustScriptzz/nexus-plus-v2")
messages = [
{"role": "user", "content": "What is Python?"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Training
- Base model: Qwen3-4B-Base (4.05B params, 4-bit quantized)
- Dataset: ~50k instruction examples (Dolly-15k, synthetic QA, general instruction data)
- Method: QLoRA (rank 16, alpha 32, targeting q_proj and v_proj)
- Hardware: RTX 5060 Ti 16GB
- Training time: ~7 hours
- Steps: 5,634
- Final loss: 1.45
Limitations
- Fine-tuned on a relatively small dataset
- May not generalize well to all domains
- Best used as a learning experiment or starting point for further fine-tuning
License
Apache 2.0
- Downloads last month
- 131
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for JustScriptzz/nexus-plus-v2
Base model
Qwen/Qwen3-4B-Base
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Base") model = PeftModel.from_pretrained(base_model, "JustScriptzz/nexus-plus-v2")