Views
No views yet
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.d_model): 768d_ff): 2304epsilon = 1e-5) with tied word embeddings.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 |
transformers fork containing the HumanV module registration.transformers containing the HumanV code:pip install git+https://github.com/humanprojectceo/transformers.git@main -U1import torch
2from transformers import AutoTokenizer
3# Classes are exposed dynamically via your registered Hugging Face modeling fork
4from transformers import HumanVConfig, HumanVForCausalLM
5
6device = "cuda" if torch.cuda.is_available() else "cpu"
7
8# 1. Initialize tokenizer (Uses Qwen2.5 multilingual tokenizer)
9tokenizer_id = "Qwen/Qwen2.5-0.5B"
10tokenizer = AutoTokenizer.from_pretrained(tokenizer_id)
11if tokenizer.pad_token is None:
12 tokenizer.pad_token = tokenizer.eos_token
13
14# 2. Load pre-trained HumanV model weights
15model_id = "humanvcompany/HumanV-0.2B-Base"
16model = HumanVForCausalLM.from_pretrained(model_id).to(device)
17model.eval()
18
19# 3. Setup input prompt (Position IDs are aligned from index 0)
20prompt = "Once upon a time, a small boy named Jack"
21inputs = tokenizer(prompt, return_tensors="pt").to(device)
22
23# 4. Secure generation sequence
24with torch.no_grad():
25 outputs = model.generate(
26 **inputs,
27 max_new_tokens=100,
28 do_sample=True, # Creative sampling enabled
29 temperature=0.8, # Controlled randomness
30 top_k=50, # Top-K filtering
31 top_p=0.9, # Nucleus sampling
32 pad_token_id=tokenizer.pad_token_id,
33 eos_token_id=tokenizer.eos_token_id,
34 )
35
36generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
37print("\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.