Instructions to use jpllm/NN-oficial with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jpllm/NN-oficial with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jpllm/NN-oficial")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jpllm/NN-oficial") model = AutoModelForCausalLM.from_pretrained("jpllm/NN-oficial", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jpllm/NN-oficial with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jpllm/NN-oficial" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jpllm/NN-oficial", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jpllm/NN-oficial
- SGLang
How to use jpllm/NN-oficial 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 "jpllm/NN-oficial" \ --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": "jpllm/NN-oficial", "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 "jpllm/NN-oficial" \ --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": "jpllm/NN-oficial", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jpllm/NN-oficial with Docker Model Runner:
docker model run hf.co/jpllm/NN-oficial
Model Card for NN-oficial
NN-oficial is an ultra-compact language model (~5.28M parameters) built upon SupraLabs/Supra-Mini-v6-1M. It incorporates an expanded vocabulary (32,000 tokens), identity-initialized middle-layer capacity expansion, and supervised instruction fine-tuning (SFT) with prompt loss masking.
Model Details
Model Description
- Developed by: jpllm
- Model type: Llama-based Causal Language Model
- Language(s) (NLP): English (
en) - License: Apache 2.0
- Finetuned from model:
SupraLabs/Supra-Mini-v6-1M
Model Sources
- Repository: https://huggingface.co/jpllm/NN-oficial
- Base Model Repository: https://huggingface.co/SupraLabs/Supra-Mini-v6-1M
Uses
Direct Use
NN-oficial is designed for research on micro-scale language models (< 10M parameters), studying parameter-efficient instruction tuning, capacity expansion, and subword vocabulary adaptation. It can generate structured, multi-line instruction completions (e.g., lists, Markdown headers, simple explanations).
Out-of-Scope Use
This model is not suitable for high-stakes decision-making, medical, legal, or factual lookup tasks due to parameter capacity constraints on world-knowledge storage.
Bias, Risks, and Limitations
Users should be aware that models under 10M parameters have physical memory bounds for storing factual world knowledge. While NN-oficial maintains strong syntactic coherence, local English grammar, and instruction response formatting, it may hallucinate factual details (e.g., exact geographic capitals or complex mathematical constants).
How to Get Started with the Model
Use the code below to load and generate text with jpllm/NN-oficial:
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "jpllm/NN-oficial"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float32)
prompt = (
"Below is an instruction that describes a task.\n\n"
"### Instruction:\nExplain what gravity is in simple terms for a 10-year-old.\n\n"
"### Response:\n"
)
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=100,
temperature=0.6,
top_p=0.9,
repetition_penalty=1.2,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
if "### Response:\n" in response:
print(response.split("### Response:\n")[-1].strip())
else:
print(response)
- Downloads last month
- 373
Model tree for jpllm/NN-oficial
Base model
SupraLabs/Supra-Mini-v6-1M