80 lines
3.1 KiB
Markdown
80 lines
3.1 KiB
Markdown
---
|
|
license: apache-2.0
|
|
language:
|
|
- en
|
|
library_name: transformers
|
|
tags:
|
|
- text-generation
|
|
- llama
|
|
- pretraining
|
|
- from-scratch
|
|
pipeline_tag: text-generation
|
|
---
|
|
|
|
# Dot-125M-Identity
|
|
|
|
An identity-tuned variant of **[Dot-125M](https://huggingface.co/perletter/Dot-125M)**,
|
|
by **[Perletter](https://perletter.com)**, part of Chirping Waves Limited (Ireland).
|
|
Same base architecture and pretrained weights,
|
|
with a short additional fine-tuning pass so the model can name itself and its creator
|
|
when asked, in a `Q: ...\nA: ...` prompt format.
|
|
|
|
Everything about the base model applies here too — see the
|
|
[Dot-125M model card](https://huggingface.co/perletter/Dot-125M) for full pretraining
|
|
details, benchmarks, and limitations. This card only covers what's different.
|
|
|
|
## What was added
|
|
|
|
A small supervised fine-tune (~300 packed 512-token blocks: ~150 varied-phrasing
|
|
identity Q&A pairs + ~150 unrelated plain-text examples mixed in to guard against the
|
|
model overfitting into injecting its identity into unrelated answers) on top of
|
|
`ckpt_best.pt`, 15 epochs, low learning rate (2e-5), loss masked to the answer span only.
|
|
|
|
## How reliable is it?
|
|
|
|
**Honestly: partially, not perfectly.** Tested on phrasings *not* seen during
|
|
fine-tuning:
|
|
|
|
- Direct/simple phrasings ("What is your name?", "Who made you?") — reliable.
|
|
- Rephrased/indirect phrasings ("Who exactly are you?", "I'm curious, who made you?")
|
|
— correct on most tries, wrong or missing on some (sampling-dependent — this is a
|
|
133.7M model, not a large instruction-tuned one).
|
|
- Non-identity questions — verified no bleed-through in direct testing (the model
|
|
doesn't start injecting "I'm Dot-125M" into unrelated answers), which was the main
|
|
risk this fine-tune's mixed-data design was meant to prevent.
|
|
- One inconsistency worth disclosing plainly: a quick GGUF (`llama-cli`) spot-check
|
|
using different default sampling settings than the direct-PyTorch tests failed to
|
|
recall the identity fact on one sample. The safetensors and GGUF weights are verified
|
|
byte-parity/near-parity identical (0.0 logit diff on export, <0.2% bpb quantization
|
|
delta) — this looks like ordinary sampling variance on an already-imperfect (not 100%)
|
|
fine-tune, not a quantization bug, but it means: **don't expect this to work every
|
|
single time.** Use lower temperature / greedy decoding for more consistent recall if
|
|
that matters for your use case.
|
|
|
|
If you need this to be fully reliable rather than "mostly," that needs a larger/longer
|
|
SFT pass than this one, which was intentionally kept small and disclosed as such.
|
|
|
|
## How to use
|
|
|
|
Same as the base model — swap the repo name:
|
|
|
|
```python
|
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
tok = AutoTokenizer.from_pretrained("perletter/Dot-125M-Identity")
|
|
model = AutoModelForCausalLM.from_pretrained("perletter/Dot-125M-Identity")
|
|
|
|
prompt = "Q: What is your name?\nA:"
|
|
inputs = tok(prompt, return_tensors="pt")
|
|
out = model.generate(**inputs, max_new_tokens=30)
|
|
print(tok.decode(out[0], skip_special_tokens=True))
|
|
```
|
|
|
|
```bash
|
|
llama-cli -m model-Q8_0.gguf -p "Q: What is your name?\nA:" -n 30
|
|
```
|
|
|
|
## License
|
|
|
|
Apache 2.0, same as the base model — see `LICENSE`. Training code not included.
|