Views
No views yet
[CLS] question [SEP] context [SEP] format is used for data preparation as input to the model. The Following parameters were used for finetuning and other parameters were kept same as in the research paper detailing the PLDR-LLM architecture.| Parameter | Value |
|---|---|
| Learning rate | 1.5x10-4 |
| Warm-up steps | 100 |
| Grad clip by norm | 1.0 |
| Epochs | 2 |
| Padding side | "right" |
| Add EOS token | False |
| min_lr_rate | 0.01 |
1from transformers import pipeline
2
3question_answerer = pipeline(
4 task="question-answering",
5 model="fromthesky/PLDR-LLM-v52-81M-FT-QA-1",
6 align_to_words=False,
7 device="cuda", # or "cpu"
8 trust_remote_code=True
9 )
10
11context="""
12The Hittites were an Anatolian Indo-European people who formed \
13one of the first major civilizations of the Bronze Age in West Asia. \
14Possibly originating from beyond the Black Sea, they settled in modern-day \
15Turkey in the early 2nd millennium BC. The Hittites formed a series of \
16polities in north-central Anatolia, including the kingdom of Kussara \
17(before 1750 BC), the Kanesh or Nesha Kingdom (c. 1750–1650 BC), \
18and an empire centered on their capital, Hattusa (around 1650 BC). \
19Known in modern times as the Hittite Empire, it reached its peak \
20during the mid-14th century BC under Šuppiluliuma I, when it \
21encompassed most of Anatolia and parts of the northern Levant \
22and Upper Mesopotamia, bordering the rival empires of \
23the Hurri-Mitanni and Assyrians.
24"""
25
26question1="When did the Hittite Empire reach its peak?"
27question2="Under which ruler did the Hittite Empire reach its peak?"
28question3="Where did the Hittites settle?"
29question4="What was the capital of the Hittite Empire?"
30question5="When was Hattusa established as the capital?"
31question6="Where did the Hittites come from?"
32question7="When did the Hittites settle in northern part of central Anatolia?"
33
34questions=[question1, question2, question3, question4,
35 question5, question6, question7]
36
37
38answers=question_answerer(question=questions, context=context)
39
40for q, a in zip(questions, answers):
41 print(f"Question: {q}\nAnswer: {a['answer'].strip()} "
42 f"(score: {a['score']}, start: {a['start']}, end: {a['end']})\n")Question: When did the Hittite Empire reach its peak?
Answer: mid-14th century BC (score: 0.7698925137519836, start: 555, end: 575)
Question: Under which ruler did the Hittite Empire reach its peak?
Answer: Šuppiluliuma I (score: 0.9744353294372559, start: 582, end: 596)
Question: Where did the Hittites settle?
Answer: modern-day Turkey (score: 0.9418576955795288, start: 196, end: 214)
Question: What was the capital of the Hittite Empire?
Answer: Hattusa (score: 0.9977174401283264, start: 453, end: 461)
Question: When was Hattusa established as the capital?
Answer: around 1650 BC (score: 0.9929400682449341, start: 463, end: 477)
Question: Where did the Hittites come from?
Answer: beyond the Black Sea (score: 0.8200137615203857, start: 158, end: 179)
Question: When did the Hittites settle in northern part of central Anatolia?
Answer: early 2nd millennium BC (score: 0.31195276975631714, start: 221, end: 245)context string in above example is from wikipedia.| Metric | Value (%) |
|---|---|
| exact_match | 59.04 |
| F1 | 71.04 |
1@misc{gokden2025pldrllmkvgcache,
2 title={PLDR-LLMs Learn A Generalizable Tensor Operator That Can Replace Its Own Deep Neural Net At Inference},
3 author={Burc Gokden},
4 year={2025},
5 eprint={2502.13502},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2502.13502},
9}
10
11@misc{gokden2024pldrllm,
12 title={PLDR-LLM: Large Language Model from Power Law Decoder Representations},
13 author={Burc Gokden},
14 year={2024},
15 eprint={2410.16703},
16 archivePrefix={arXiv},
17 primaryClass={cs.CL},
18 url={https://arxiv.org/abs/2410.16703},
19}