Views
No views yet
| Parameter | Value |
|---|---|
| Parameters | 89.8M |
| Layers | 10 |
| Hidden dim | 768 |
| Attention heads | 12 |
| KV heads (GQA) | 4 |
| Max sequence length | 512 |
| Vocab size | 50,304 |
| FFN activation | SwiGLU |
| Position encoding | RoPE (θ=500000) |
| Norm | RMSNorm |
| Training | Float32, full precision |
1# 1. Clone the repository
2git clone https://huggingface.co/JustScriptzz/nexus-smAll-v1
3cd nexus-smAll-v1
4
5# 2. Install dependencies
6pip install torch --index-url https://download.pytorch.org/whl/cpu
7pip install tokenizersGPU users: Replace--index-url https://download.pytorch.org/whl/cpuwith the appropriate CUDA version, e.g.--index-url https://download.pytorch.org/whl/cu124for CUDA 12.4.
python chat.py --weights weights/nexus_instruct.pt1from src.model import Nexus
2from src.config import NexusConfig
3from tokenizers import Tokenizer
4import torch
5
6config = NexusConfig()
7model = Nexus(config)
8
9checkpoint = torch.load("weights/nexus_instruct.pt", map_location="cpu", weights_only=False)
10model.load_state_dict(checkpoint["model_state_dict"])
11model.eval()
12
13tokenizer = Tokenizer.from_file("data/tokenizer.json")
14
15prompt = "User: What is Python?\nAssistant:"
16encoded = tokenizer.encode(prompt)
17tokens = torch.tensor([encoded.ids])
18
19output, _ = model.generate(tokens, max_new_tokens=64, temperature=0.2, top_k=40, top_p=0.9)
20reply = tokenizer.decode(output)
21print(reply)