CoolFace
Modelpublic

Smilyai-labs/Nova-1-Standard-1.3B

sourceHugging Faceapache-2.0updated 3mo agoView on Hugging Face
2likes60downloads
Model Card

Nova-1 Standard (Phase 2 SFT)

<video controls width="100%"> <source src="https://cdn-uploads.huggingface.co/production/uploads/68f4abf8f64bb4002a21a428/BFeNSjs_TFy5xoyEDZJFI.mp4" type="video/mp4"> The Video Tag is not supported by your browser! </video>

This Repo is the latest stable edition of Nova-1-Standard! For the latest version goto our "Preview" repo

Nova-1 is a 1.2B parameter decoder-only language model from Smilyai Labs. Trained from scratch, it features a custom architecture built for maximum efficiency and native HuggingFace Transformers compatibility.

๐Ÿง  Architecture Highlights

  • โ€”Mixture-of-Depths (MoD) โ€” Dynamically routes only the most important tokens through full compute, skipping the rest for efficiency without sacrificing quality.
  • โ€”Grouped-Query Attention (GQA) โ€” 16 query heads, 8 KV heads for faster inference and lower VRAM footprint.
  • โ€”SwiGLU FFN โ€” Gated activation functions for better training stability and downstream performance.
  • โ€”Rotary Position Embeddings (RoPE) โ€” Native support for YaRN context scaling out of the box.
  • โ€”Custom Tokenizer โ€” GPT-2 BPE base extended with domain-specific special tokens for code, math, and ChatML.

Model Details

PropertyValue
Parameters1.27B
Hidden dim2048
Layers24 (12 Full + 12 MoD)
Attention heads16 (GQA, 8 KV)
Context length2048 tokens (YaRN stretchable)
Pretraining Tokens~4.00B
Training Phase2 (Supervised Fine-Tuning)
Dtypebfloat16

๐Ÿš€ Usage

Because this model is 100% HuggingFace-native, you can use standard pipeline or AutoModelForCausalLM APIs without any custom generation loops. The generation_config.json handles all the sampler defaults for you.

Method 1: HuggingFace Pipeline (Easiest)

python
import torch
from transformers import pipeline

pipe = pipeline(
    "text-generation", 
    model="Smilyai-labs/Nova-1-Standard", 
    torch_dtype=torch.bfloat16, 
    device_map="auto",
    trust_remote_code=True
)

messages = [
    {"role": "system", "content": "You are Nova, a helpful, honest AI assistant."},
    {"role": "user", "content": "Write a Python function to check if a number is prime."}
]

# The pipeline automatically applies ChatML and uses the correct sampler defaults!
response = pipe(messages, max_new_tokens=256)
print(response[0]['generated_text'][-1]['content'])

Method 2: Standard AutoModel

python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "Smilyai-labs/Nova-1-Standard"

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)

messages = [
    {"role": "system", "content": "You are Nova, a helpful, honest AI assistant."},
    {"role": "user", "content": "Explain recursion like I'm five."}
]

# Apply ChatML template
inputs = tokenizer.apply_chat_template(
    messages, 
    add_generation_prompt=True, 
    return_tensors="pt"
).to(model.device)

# Generate (uses repo generation_config defaults)
outputs = model.generate(inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
โš ๏ธ Note on Inference: This model's architecture intentionally disables HuggingFace's KV Cache (use_cache=False) to ensure maximum context retention. The prepare_inputs_for_generation method automatically handles passing the full context window on each step. Just don't manually pass use_cache=True or it will throw a warning and force it back to False.

๐Ÿท๏ธ Special Tokens

Nova-1 natively understands domain markers and ChatML structure.

  • โ€”<|im_start|>, <|im_end|> โ€” Chat format markers
  • โ€”<|code_start|>, <|code_end|> โ€” Code boundaries
  • โ€”<|math_start|>, <|math_end|> โ€” Math content
  • โ€”<|domain_code|>, <|domain_math|>, <|domain_general|> โ€” Domain context indicators (used in pretraining, though Phase 2 SFT primarily relies on pure ChatML)

๐Ÿ“š Training Data

Phase 1 (Pretraining): Trained on ~4B tokens of high-quality filtered web text, code, and math.

  • โ€”General text: FineWeb, C4, Wikipedia
  • โ€”Code: The Stack v2, CodeSearchNet, Magicoder
  • โ€”Math: Open-Web-Math, MetaMathQA

Phase 2 (Instruction Tuning): Supervised Fine-Tuning on ~200k high-quality multi-turn conversations and identity reinforcement data.

  • โ€”Chat: OpenHermes 2.5, UltraChat 200k, Tulu Mix
  • โ€”Code: Evol-Instruct, CodeFeedback
  • โ€”Math: MetaMathQA, GSM8K
  • โ€”Identity: Custom synthetic dataset to establish Nova persona and resist jailbreaks.

License

Apache 2.0

Citation

bibtex
@software{nova1,
  author = {Smilyai Labs},
  title = {Nova-1: Mixture-of-Depths Language Model},
  year = {2024},
  url = {https://huggingface.co/Smilyai-labs/Nova-1-Standard}
}

Built with ๐Ÿ’™ by Smilyai Labs