Downloads · 30 days
26
21% of all-time downloads
humanvcompany/HumanV-0.2B-Base
HumanV-0.2B-Base is a text generation model from humanvcompany. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
HumanV-0.2B-Base is a 199-million parameter causal language model built with the custom HumanV architecture. This model serves as a technical proof-of-concept for the integration of hybrid sparse attention mechanisms…
Downloads · 30 days
26
21% of all-time downloads
All-time downloads
124
Public
Parameters
199M
808 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors796 MB · 99%
From the Hugging Face model README
HumanV-0.2B-Base is a 199-million parameter causal language model built with the custom HumanV architecture. This model serves as a technical proof-of-concept for the integration of hybrid sparse attention mechanisms inside modern transformer pipelines, verifying the stability, gradient flow, and memory footprint optimizations of the HumanV architecture under enterprise pre-training configurations.
The HumanV architecture is designed for resource-efficient text generation, implementing advanced hardware-friendly optimizations to significantly reduce the Key-Value (KV) Cache footprint during autoregressive inference.
d_model): 768d_ff): 2304epsilon = 1e-5) with tied word embeddings.The model was pre-trained using a highly structured, padding-free pipeline to eliminate overfitting on padding tokens and ensure stable, continuous learning.
roneneldan/TinyStories (40,000 training stories, 4,000 validation stories).| Training Step | Training Loss* | Validation Loss | Evaluation Perplexity (PPL) |
|---|---|---|---|
| 100 | 22.980 | 5.575 | 263.879 |
| 300 | 14.670 | 3.727 | 41.569 |
| 500 | 12.876 | 3.277 | 26.505 |
| 700 | 11.938 | 3.055 | 21.223 |
| 900 | 11.812 | 2.970 | 19.495 |
| 1000 (Final) | 11.641 | 2.964 | 19.384 |
*Note on Training Loss: Due to standard Hugging Face logging formats under active gradient accumulation, the logged training loss is scaled by the accumulation factor of 4. The real training loss at step 1000 is 11.641 / 4 ≈ 2.91, showing exceptional alignment with the validation loss of 2.96.
To deploy or run inference with this model, you must use the custom transformers fork containing the HumanV module registration.
Install the validated company-specific fork of transformers containing the HumanV code:
pip install git+https://github.com/humanprojectceo/transformers.git@main -U
Executing LLM generations in secure production environments requires sandboxing and deterministic constraints. Use the following clean implementation structure:
import torch
from transformers import AutoTokenizer
# Classes are exposed dynamically via your registered Hugging Face modeling fork
from transformers import HumanVConfig, HumanVForCausalLM
device = "cuda" if torch.cuda.is_available() else "cpu"
# 1. Initialize tokenizer (Uses Qwen2.5 multilingual tokenizer)
tokenizer_id = "Qwen/Qwen2.5-0.5B"
tokenizer = AutoTokenizer.from_pretrained(tokenizer_id)
if tokenizer.pad_token is None:
tokenizer.pad_token = tokenizer.eos_token
# 2. Load pre-trained HumanV model weights
model_id = "humanvcompany/HumanV-0.2B-Base"
model = HumanVForCausalLM.from_pretrained(model_id).to(device)
model.eval()
# 3. Setup input prompt (Position IDs are aligned from index 0)
prompt = "Once upon a time, a small boy named Jack"
inputs = tokenizer(prompt, return_tensors="pt").to(device)
# 4. Secure generation sequence
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=100,
do_sample=True, # Creative sampling enabled
temperature=0.8, # Controlled randomness
top_k=50, # Top-K filtering
top_p=0.9, # Nucleus sampling
pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id,
)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print("\nGenerated Story:\n", generated_text)
missing keys: ['lm_head.weight']. This is expected behavior under the tie_word_embeddings=True configuration, which successfully maps output weights to the input embeddings to save VRAM and disk space. It does not impact inference or functional operations.