A improve version of SnowflakeCore-G1-Tiny custom GPT-style transformer language model built from scratch using PyTorch, trained on the common-pile/wikimedia_filtered dataset.
Model Overview
SnowflakeCore-G1-Tiny2 is a GPT-style autoregressive transformer model with
~400M parameters
designed for text generation tasks.
Key Features
2048 token context window
for extended conversations
Mixed precision training
(BF16/FP16) for efficiency
Custom attention implementation
with fused operations
Early stopping mechanisms
for optimal training
Gradient accumulation
for effective large batch training
Architecture Specifications
Component
Value
Model Type
Autoregressive Transformer
Parameters
~400M
Layers
24
Hidden Size
1024
Attention Heads
16
Head Dimension
64
FFN Dimension
4096
Context Length
2048 tokens
Vocabulary Size
50,257 (GPT-2 tokenizer)
Model Benchmarks
The following benchmarks compare
SnowflakeCore-G1-Tiny2
, its predecessor, and GPT-2 on key performance and text quality metrics.
Performance & Quality Metrics
Model
Params
Size (MB)
Speed (tok/s)
Vocab Div.
Dist. Bigrams
Dist. Trigrams
Bigram Repet.
Trigram Repet.
SnowflakeCore-G1-Tiny2
355.9M
1357.54
22.13
0.3440
0.7408
0.8834
0.2592
0.1166
SnowflakeCore-G1-Tiny
355.9M
1357.54
22.12
0.2780
0.6111
0.7421
0.3889
0.2579
GPT-2 (small)
124.4M
474.70
47.73
0.2590
0.6408
0.7946
0.3592
0.2054
Notes:
Vocabulary Diversity = unique tokens / total tokens
Distinct N-grams = unique n-grams / total n-grams
Lower repetition rates indicate better text novelty
Memory Usage (CPU)
All models report
N/A
for CPU memory usage across all sequence lengths.
Sequence Length
SnowflakeCore-G1-Tiny
SnowflakeCore-G1-Tiny2
GPT-2
128
N/A (CPU)
N/A (CPU)
N/A
512
N/A (CPU)
N/A (CPU)
N/A
1024
N/A (CPU)
N/A (CPU)
N/A
2048
N/A (CPU)
N/A (CPU)
N/A
Quick Start
Installation
pip install torch transformers # if not already installed
Basic Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained(
"FlameF0X/SnowflakeCore-G1-Tiny2",
trust_remote_code=True,
force_download=True,
use_safetensors=True,
)
tokenizer = AutoTokenizer.from_pretrained(
"FlameF0X/SnowflakeCore-G1-Tiny2",
trust_remote_code=True,
force_download=True,
use_safetensors=True,
)
defcustom_greedy_generate(prompt, max_length=50):
model.eval()
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
generated = input_ids
with torch.no_grad():
for _ inrange(max_length):
outputs = model(input_ids=generated)
next_token_logits = outputs["logits"][:, -1, :]
next_token_id = torch.argmax(next_token_logits, dim=-1).unsqueeze(-1)
generated = torch.cat((generated, next_token_id), dim=1)
if next_token_id.item() == tokenizer.eos_token_id:
breakreturn tokenizer.decode(generated[0], skip_special_tokens=True)
# Generate text
prompt = "Once upon a time"
result = custom_greedy_generate(prompt)
print(result)
SnowflakeCore-G1-Tiny2 huggingface.co is an AI model on huggingface.co that provides SnowflakeCore-G1-Tiny2's model effect (), which can be used instantly with this FlameF0X SnowflakeCore-G1-Tiny2 model. huggingface.co supports a free trial of the SnowflakeCore-G1-Tiny2 model, and also provides paid use of the SnowflakeCore-G1-Tiny2. Support call SnowflakeCore-G1-Tiny2 model through api, including Node.js, Python, http.
SnowflakeCore-G1-Tiny2 huggingface.co is an online trial and call api platform, which integrates SnowflakeCore-G1-Tiny2's modeling effects, including api services, and provides a free online trial of SnowflakeCore-G1-Tiny2, you can try SnowflakeCore-G1-Tiny2 online for free by clicking the link below.
FlameF0X SnowflakeCore-G1-Tiny2 online free url in huggingface.co:
SnowflakeCore-G1-Tiny2 is an open source model from GitHub that offers a free installation service, and any user can find SnowflakeCore-G1-Tiny2 on GitHub to install. At the same time, huggingface.co provides the effect of SnowflakeCore-G1-Tiny2 install, users can directly use SnowflakeCore-G1-Tiny2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
SnowflakeCore-G1-Tiny2 install url in huggingface.co: