Instructions to use harshit36/Nova-Casual-LLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use harshit36/Nova-Casual-LLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="harshit36/Nova-Casual-LLM")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("harshit36/Nova-Casual-LLM", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use harshit36/Nova-Casual-LLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "harshit36/Nova-Casual-LLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "harshit36/Nova-Casual-LLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/harshit36/Nova-Casual-LLM
- SGLang
How to use harshit36/Nova-Casual-LLM 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 "harshit36/Nova-Casual-LLM" \ --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": "harshit36/Nova-Casual-LLM", "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 "harshit36/Nova-Casual-LLM" \ --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": "harshit36/Nova-Casual-LLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use harshit36/Nova-Casual-LLM with Docker Model Runner:
docker model run hf.co/harshit36/Nova-Casual-LLM
Nova-Casual-LLM
A lightweight and efficient transformer-based language model built with custom architecture and integrated seamlessly into the Hugging Face ecosystem.
Model Summary
- Model Name: NovaForCausalLM
- Architecture: Custom decoder-only transformer (
NOVA) - Model Type:
nova - Use Case: Causal Language Modeling (text generation, auto-completion)
- Parameters: 14,412,400 trainable parameters
- Pretrained Tokenizer:
PreTrainedTokenizerFast - Framework: PyTorch
- Hugging Face Integration: Compatible with
transformersvia customAutoModelandAutoConfigregistration.
Files Included
| File | Description |
|---|---|
config.json |
Configuration of model hyperparameters |
model.safetensors |
Serialized model weights (efficient format) |
nova_modelling.py |
Custom model and config class definitions |
tokenizer.json |
Serialized tokenizer |
tokenizer_config.json |
Tokenizer configuration metadata |
special_tokens_map.json |
Mapping for special tokens (e.g., BOS, EOS) |
README.md |
Model card (youβre reading it!) |
Model Architecture
NovaForCausalLM
The model consists of:
- Embedding layers: token + positional
- Stack of transformer decoder blocks
- Multi-head attention with 640 individual heads
- Layer normalization
- Final linear head for vocabulary logits
Configuration (NovaConfig)
{
"model_type": "nova",
"vocab_size": 6000,
"block_size": 256,
"n_embd": 640,
"n_layer": 4,
"n_head": 8
}
π Usage
Step 1: Clone the repo (to get the nova_modelling.py)
git clone https://huggingface.co/harshit36/Nova-Casual-LLM
cd Nova-Casual-LLM
import sys
sys.path.append("./Nova-Casual-LLM/") # add current dir to path
from transformers import PreTrainedTokenizerFast
from nova_modelling import NovaConfig, NovaForCausalLM
# Load tokenizer
tokenizer = PreTrainedTokenizerFast.from_pretrained("harshit36/Nova-Casual-LLM")
# Load config
config = NovaConfig.from_pretrained("harshit36/Nova-Casual-LLM")
# Instantiate model using your custom class
model = NovaForCausalLM(config)
model = model.from_pretrained("harshit36/Nova-Casual-LLM")
# Use the model
input_ids = tokenizer("Hello world", return_tensors="pt").input_ids
output = model.generate(input_ids)
print(tokenizer.decode(output[0], skip_special_tokens=True).replace(" ","").replace("Δ "," ").replace("Δ","\n"))
Intended Use
General text generation
Hybrid Positional Encoding Research model (Combination of Sinusoidal and learnable encodings)
Educational demonstrations of custom HF model integration
Rapid prototyping of transformer models
- Downloads last month
- 5