talkie-1930-13b-base-tf (BF16 Transformers + safetensors conversion)
This repository is a Transformers-compatible conversion of
talkie-lm/talkie-1930-13b-base, the original Talkie base completion model.
The upstream model is a 13B vintage language model trained on 260B tokens of pre-1931 English-language text, according to the original model card.
The original base checkpoint is FP32. This repository stores a BF16 conversion of those weights and packages them for Transformers with custom trust_remote_code modules and BF16 sharded safetensors.
This is not an official Talkie release; refer to the upstream model card for
the author-provided provenance and usage notes.
Source Model
Conversion Details
- Weight dtype: BF16
- Weight format: sharded safetensors
- Context length: 4096 tokens
- Architecture: custom Talkie code loaded with
trust_remote_code=True
- Tokenizer: Talkie tiktoken-compatible tokenizer exposed through
AutoTokenizer
The public reference configuration originally advertised 2,048 positions, but
the Talkie team later clarified that the model was trained with a 4,096-token
context. This conversion uses the corrected 4,096-token limit.
Usage
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4path = "xlr8harder/talkie-1930-13b-base-tf"
5tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True)
6model = AutoModelForCausalLM.from_pretrained(
7 path,
8 trust_remote_code=True,
9 dtype=torch.bfloat16,
10 device_map={"": "cuda"},
11 use_safetensors=True,
12)
For base completions:
1inputs = tokenizer("The latest discoveries in physics suggest that", return_tensors="pt").to("cuda")
2output = model.generate(**inputs, max_new_tokens=64)
3print(tokenizer.decode(output[0], skip_special_tokens=True))
vLLM
The included remote-code model implements the Transformers attention-interface
hooks expected by vLLM's Transformers modeling backend. For compatibility with
that backend, the original single-scalar lm_head_gain is folded into
lm_head.weight during conversion; the other Talkie gain parameters remain
explicit model parameters. Using vLLM's logit_scale-style approach was not
used because it applies scaling after the output matmul, while Talkie applies
the gain to the head weight before the matmul. In BF16 this can introduce small
rounding differences and, in smoke tests, changed one near-tied top-token
ordering.
1vllm serve xlr8harder/talkie-1930-13b-base-tf \
2 --task generate \
3 --model-impl transformers \
4 --trust-remote-code \
5 --dtype bfloat16 \
6 --max-model-len 4096
Validation
The BF16 checkpoint matched a runtime BF16 cast from the original FP32 checkpoint exactly on the tested forward pass. The Transformers safetensors model was also compared against the Talkie reference architecture; the top-10 next-token ordering matched exactly, with observed max absolute logit difference 0.03125.