Text Generation
PEFT
lora
trl
naming
brand-generation
controllable-generation
krystv commited on
Commit
d4ab28b
·
verified ·
1 Parent(s): 9ae20f8

Add research rationale document

Browse files
Files changed (1) hide show
  1. RESEARCH.md +69 -0
RESEARCH.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Nomen-AI Research Rationale
2
+
3
+ Nomen-AI treats name generation as controllable cross-lingual morpho-phonetic synthesis rather than unconstrained next-token completion.
4
+
5
+ ## Why not a 7B+ LLM?
6
+
7
+ The target runtime is a free-tier Google Colab T4 with about 15GB VRAM. A 7B+ model is not appropriate for reliable full training. Nomen-AI therefore uses:
8
+
9
+ - `Qwen/Qwen2.5-1.5B-Instruct`
10
+ - LoRA adapters
11
+ - fp16
12
+ - short sequence length (`max_length=192`)
13
+
14
+ ## Control-token conditioning
15
+
16
+ Control tokens are based on the CTRL-style idea that prepended codes condition generation:
17
+
18
+ - Paper: CTRL: A Conditional Transformer Language Model for Controllable Generation
19
+ - arXiv: https://arxiv.org/abs/1909.05858
20
+
21
+ Nomen-AI controls:
22
+
23
+ ```text
24
+ [ROOT:japanese:40+nordic:60] [THEME:gaming] [SYL:3] [LEN:8] [CREATIVE:0.8]
25
+ ```
26
+
27
+ ## SFT phase
28
+
29
+ TRL SFTTrainer is used to teach prompt-to-name behavior from the synthetic morpheme dataset.
30
+
31
+ Docs: https://huggingface.co/docs/trl/sft_trainer
32
+
33
+ Dataset: https://huggingface.co/datasets/krystv/nomen-ai-sft
34
+
35
+ ## DPO phase
36
+
37
+ DPO steers away from generic/derivative names using preference pairs:
38
+
39
+ - chosen: novel morpho-phonetic name
40
+ - rejected: derivative/cliche name (`TechHub`, `Brandify`, `GetZone`, etc.)
41
+
42
+ Paper: https://arxiv.org/abs/2305.18290
43
+ Docs: https://huggingface.co/docs/trl/dpo_trainer
44
+ Dataset: https://huggingface.co/datasets/krystv/nomen-ai-dpo
45
+
46
+ ## Creativity knob
47
+
48
+ Low creativity uses contrastive search:
49
+
50
+ - SimCTG: https://arxiv.org/abs/2202.06417
51
+ - Contrastive Search Is What You Need: https://arxiv.org/abs/2210.14140
52
+
53
+ High creativity uses min-p sampling:
54
+
55
+ - Min-p sampling: https://arxiv.org/abs/2407.01082
56
+
57
+ ## Anti-duplication
58
+
59
+ Nomen-AI includes an inference-time novelty matrix:
60
+
61
+ - fuzzy string similarity
62
+ - character n-gram overlap
63
+ - thresholded novelty score
64
+
65
+ Implementation: https://huggingface.co/krystv/nomen-ai/blob/main/nomen_ai/antidup.py
66
+
67
+ ## Practical status
68
+
69
+ The code, datasets, notebooks, demo, Docker path, and validation scripts are complete. Actual SFT/DPO adapter weights are not present yet because GPU/HF Jobs execution from the agent environment was repeatedly rejected.