Instructions to use StarpowerTechnology/arXiv-WVY-43M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use StarpowerTechnology/arXiv-WVY-43M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="StarpowerTechnology/arXiv-WVY-43M")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("StarpowerTechnology/arXiv-WVY-43M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use StarpowerTechnology/arXiv-WVY-43M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "StarpowerTechnology/arXiv-WVY-43M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "StarpowerTechnology/arXiv-WVY-43M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/StarpowerTechnology/arXiv-WVY-43M
- SGLang
How to use StarpowerTechnology/arXiv-WVY-43M 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 "StarpowerTechnology/arXiv-WVY-43M" \ --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": "StarpowerTechnology/arXiv-WVY-43M", "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 "StarpowerTechnology/arXiv-WVY-43M" \ --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": "StarpowerTechnology/arXiv-WVY-43M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use StarpowerTechnology/arXiv-WVY-43M with Docker Model Runner:
docker model run hf.co/StarpowerTechnology/arXiv-WVY-43M
Configuration Parsing Warning:In config.json: "architectures" must be an array
arXiv-WVY-43M
arXiv-WVY-43M is a 43.5M parameter causal language model developed by Starpower Technology.
Kaggle [https://www.kaggle.com/code/starpowertechnology/arxiv-wvy-43m-demo]
The model uses a compact DeepSeek-V3-style architecture and was trained from scratch on arXiv titles and abstracts.
This is a base language model, not an instruction-tuned or chat-tuned model.
Model Details
| Property | Value |
|---|---|
| Parameters | 43,489,608 |
| Vocabulary | 24,000 |
| Hidden size | 384 |
| Transformer layers | 6 |
| MTP layers | 1 |
| Attention heads | 6 |
| MLP intermediate size | 1,024 |
| Routed experts | 8 |
| Experts selected per token | 2 |
| Shared experts | 1 |
| Q LoRA rank | 128 |
| KV LoRA rank | 96 |
| QK RoPE head dim | 16 |
| QK non-RoPE head dim | 48 |
| Value head dim | 64 |
| RoPE theta | 10,000 |
| YaRN factor | 4.0 |
| Original max position | 1,024 |
Architecture
WVY-43M uses a compact DeepSeek-V3-style causal language model architecture containing:
- Multi-head latent attention
- Mixture-of-Experts layers
- 8 routed experts with Top-2 routing
- 1 shared expert
- Q/KV low-rank projections
- Rotary positional embeddings
- YaRN RoPE scaling
- Multi-Token Prediction layer
The architecture is intentionally kept small for research into compact language models, training from scratch, experimentation, and low-compute deployment.
Training
The model was pretrained from random initialization.
Training corpus: arXiv paper titles and abstracts
Observed training tokens: approximately 726 million
Checkpoint: step 5,600
The training corpus gives the model significant exposure to scientific and technical language, particularly terminology appearing in academic research.
Using the Model on Kaggle
Enable Internet access for the Kaggle notebook so the model can be downloaded from Hugging Face.
1. Install dependencies
!pip install -q -U transformers huggingface_hub tokenizers accelerate
2. Download and load WVY-43M
import os
import torch
from huggingface_hub import hf_hub_download
from transformers import (
AutoConfig,
AutoModelForCausalLM,
PreTrainedTokenizerFast,
)
REPO_ID = "StarpowerTechnology/arXiv-WVY-43M"
# ---------------------------------------------------------
# Download tokenizer and weights
# ---------------------------------------------------------
tokenizer_path = hf_hub_download(
repo_id=REPO_ID,
filename="tokenizer.json"
)
weights_path = hf_hub_download(
repo_id=REPO_ID,
filename="model.pt"
)
# ---------------------------------------------------------
# Tokenizer
# ---------------------------------------------------------
tokenizer = PreTrainedTokenizerFast(
tokenizer_file=tokenizer_path
)
# ---------------------------------------------------------
# Load the custom DeepSeek-V3 configuration from Hugging Face
# ---------------------------------------------------------
config = AutoConfig.from_pretrained(
REPO_ID,
trust_remote_code=True
)
# Build the model architecture without looking for
# pytorch_model.bin / safetensors because WVY uses model.pt.
model = AutoModelForCausalLM.from_config(
config,
trust_remote_code=True
)
# ---------------------------------------------------------
# Load WVY-43M weights
# ---------------------------------------------------------
checkpoint = torch.load(
weights_path,
map_location="cpu",
weights_only=False
)
# Support common checkpoint formats.
if isinstance(checkpoint, dict):
for key in ["state_dict", "model_state_dict", "model"]:
if key in checkpoint and isinstance(checkpoint[key], dict):
checkpoint = checkpoint[key]
break
# Remove DataParallel prefix if present.
if (
isinstance(checkpoint, dict)
and len(checkpoint) > 0
and all(k.startswith("module.") for k in checkpoint)
):
checkpoint = {
k[len("module."):]: v
for k, v in checkpoint.items()
}
model.load_state_dict(checkpoint, strict=True)
# ---------------------------------------------------------
# Device
# ---------------------------------------------------------
device = torch.device(
"cuda" if torch.cuda.is_available() else "cpu"
)
model = model.to(device)
model.eval()
print("Model:", REPO_ID)
print("Device:", device)
params = sum(p.numel() for p in model.parameters())
print(f"Parameters: {params:,}")
Generate Text
Because arXiv-WVY-43M is a base causal language model, prompts can be passed directly as text.
prompt = "Quantum entanglement is"
inputs = tokenizer(
prompt,
return_tensors="pt",
add_special_tokens=False
)
input_ids = inputs["input_ids"]
# WVY-43M configuration:
# BOS = 0
# EOS = 1
bos_id = config.bos_token_id
bos = torch.full(
(input_ids.shape[0], 1),
bos_id,
dtype=torch.long
)
input_ids = torch.cat(
[bos, input_ids],
dim=1
).to(device)
attention_mask = torch.ones_like(input_ids)
with torch.no_grad():
output = model.generate(
input_ids=input_ids,
attention_mask=attention_mask,
max_new_tokens=150,
do_sample=True,
temperature=0.7,
top_p=0.9,
eos_token_id=config.eos_token_id,
pad_token_id=config.eos_token_id,
)
generated_tokens = output[
0,
input_ids.shape[1]:
]
text = tokenizer.decode(
generated_tokens,
skip_special_tokens=True
)
print(text)
Simple Generation Function
def generate(
prompt,
max_new_tokens=150,
temperature=0.7,
top_p=0.9
):
encoded = tokenizer(
prompt,
return_tensors="pt",
add_special_tokens=False
)
input_ids = encoded["input_ids"]
bos = torch.full(
(input_ids.shape[0], 1),
config.bos_token_id,
dtype=torch.long
)
input_ids = torch.cat(
[bos, input_ids],
dim=1
).to(device)
attention_mask = torch.ones_like(input_ids)
with torch.no_grad():
output = model.generate(
input_ids=input_ids,
attention_mask=attention_mask,
max_new_tokens=max_new_tokens,
do_sample=True,
temperature=temperature,
top_p=top_p,
eos_token_id=config.eos_token_id,
pad_token_id=config.eos_token_id,
)
generated = output[
0,
input_ids.shape[1]:
]
return tokenizer.decode(
generated,
skip_special_tokens=True
)
print(
generate(
"The relationship between gravity and spacetime is"
)
)
Intended Use
arXiv-WVY-43M is intended for research involving:
- Small language models
- Language-model pretraining
- Scientific text generation
- Physics and technology language modeling
- Mixture-of-Experts architectures
- Low-parameter language-model experimentation
- Fine-tuning and continued pretraining
- Educational experiments with models trained from scratch
Limitations
WVY-43M contains approximately 43.5 million parameters and should be evaluated as a small experimental language model rather than as a replacement for modern large language models.
The released checkpoint is a base pretrained model and has not been instruction-tuned for assistant-style conversations.
No formal benchmark results are currently included in this model card.
License
MIT
Developer
Starpower Technology
Hugging Face organization: StarpowerTechnology
- Downloads last month
- 291
Model tree for StarpowerTechnology/arXiv-WVY-43M
Unable to build the model tree, the base model loops to the model itself. Learn more.