Text Generation
Transformers
Safetensors
Korean
English
nova_gdn2
nova
gdn2
gated-deltanet
hybrid
korean
custom_code
Instructions to use Insightnova/Nova-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Insightnova/Nova-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Insightnova/Nova-1B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Insightnova/Nova-1B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Insightnova/Nova-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Insightnova/Nova-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Insightnova/Nova-1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Insightnova/Nova-1B
- SGLang
How to use Insightnova/Nova-1B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Insightnova/Nova-1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Insightnova/Nova-1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Insightnova/Nova-1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Insightnova/Nova-1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Insightnova/Nova-1B with Docker Model Runner:
docker model run hf.co/Insightnova/Nova-1B
Download architecture_config.py from Insightnova/Nova-1B: direct link, hf CLI and curl.
- Browser
- Download file 1.98 kB
-
https://huggingface.co/Insightnova/Nova-1B/resolve/main/architecture_config.py
- Command line
-
hf download hf://Insightnova/Nova-1B/architecture_config.py
-
curl -L -o architecture_config.py https://huggingface.co/Insightnova/Nova-1B/resolve/main/architecture_config.py
1.98 kB
| """Architecture presets and options used to rebuild the accelerated inference model.""" | |
| from dataclasses import dataclass | |
| from typing import Optional, Literal, Dict | |
| ModelSize = Literal["main"] | |
| SEED = 42 | |
| class ModelShape: | |
| """A named model-size preset; individual fields can be overridden per checkpoint.""" | |
| d_model: int | |
| n_layers: int | |
| n_heads: int | |
| head_dim: int | |
| ffn_hidden: int | |
| n_kv_heads: Optional[int] = None | |
| # Shape of the published Nova-1B checkpoint. NovaConfig.architecture_options may | |
| # override any field when rebuilding a checkpoint. | |
| MODEL_SHAPES: Dict[ModelSize, ModelShape] = { | |
| "main": ModelShape( | |
| d_model=1536, | |
| n_layers=26, | |
| n_heads=12, | |
| head_dim=128, | |
| ffn_hidden=6144, | |
| n_kv_heads=4, | |
| ), | |
| } | |
| class ModelOptions: | |
| """Architecture options used to reconstruct an inference checkpoint.""" | |
| d_model: Optional[int] = None | |
| n_layers: Optional[int] = None | |
| n_heads: Optional[int] = None | |
| head_dim: Optional[int] = None | |
| ffn_hidden: Optional[int] = None | |
| n_kv_heads: Optional[int] = None | |
| rope_theta: float = 500_000 | |
| rope_full_precision: bool = True | |
| layer_norm_eps: float = 1e-5 | |
| layer_norm_bias: bool = False | |
| attn_qk_norm: bool = True | |
| attention_bias: bool = False | |
| ffn_bias: bool = False | |
| lm_head_bias: bool = False | |
| tie_word_embeddings: bool = True | |
| attention_backend: Optional[str] = None | |
| enable_swa: bool = False | |
| swa_window: Optional[int] = None | |
| swa_context_ratio: int = 2 | |
| swa_full_attention_first_layer: bool = False | |
| swa_full_attention_last_layer: bool = False | |
| # GDN2 layer dimensions of the published checkpoint. These intentionally | |
| # differ from the FLA GatedDeltaNet2 defaults (expand_v 1.0, allow_neg_eigval False). | |
| gdn_expand_v: float = 2.0 | |
| gdn_allow_neg_eigval: bool = True | |
| gdn_conv_size: int = 4 | |
| gdn_conv_bias: bool = False | |