pathcosmos commited on
Commit
dc788f2
ยท
verified ยท
1 Parent(s): ef6210a

docs: add detailed sampling config section with eval grid results

Browse files
Files changed (1) hide show
  1. README.md +49 -0
README.md CHANGED
@@ -99,6 +99,55 @@ llama.cpp/GGUF ์ถ”๋ก  ์‹œ ์ค„๋ฐ”๊ฟˆ(`\n`) ๋“ฑ ๋ฏธ๋“ฑ๋ก ๋ฌธ์ž๋กœ ์ธํ•œ ํฌ๋ž˜
99
 
100
  ์ƒ์„ธ: `reports/2026-03-09_GGUF_DEPLOYMENT_AND_EVAL_REPORT.md`, `eval/results/frankenstallm-3b-v2/ollama_benchmark_summary.md`
101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  ## ์‚ฌ์šฉ
103
 
104
  - **Transformers**: ์ด ์ฒดํฌํฌ์ธํŠธ๋ฅผ ๊ทธ๋Œ€๋กœ `from_pretrained(...)` ๋กœ ๋กœ๋“œ ๊ฐ€๋Šฅ.
 
99
 
100
  ์ƒ์„ธ: `reports/2026-03-09_GGUF_DEPLOYMENT_AND_EVAL_REPORT.md`, `eval/results/frankenstallm-3b-v2/ollama_benchmark_summary.md`
101
 
102
+ ## ์ƒ˜ํ”Œ๋ง ํŒŒ๋ผ๋ฏธํ„ฐ (Sampling Config)
103
+
104
+ ORPO ํ‰๊ฐ€ ๊ทธ๋ฆฌ๋“œ ์‹ค์ธก ์ตœ์ ๊ฐ’ (`t0.7_rep1.2`) ๊ธฐ์ค€์ž…๋‹ˆ๋‹ค.
105
+
106
+ ### ๊ถŒ์žฅ ํŒŒ๋ผ๋ฏธํ„ฐ
107
+
108
+ | ํŒŒ๋ผ๋ฏธํ„ฐ | ๊ฐ’ | ๋น„๊ณ  |
109
+ |---------|-----|------|
110
+ | `temperature` | **0.7** | ์ฐฝ์˜์„ฑ/์ผ๊ด€์„ฑ ๊ท ํ˜•์  |
111
+ | `repetition_penalty` (PyTorch) | **1.2** | ๋ฐ˜๋ณต ์–ต์ œ |
112
+ | `repeat_penalty` (Ollama) | **1.2** | ๋™์ผ ๊ฐ’ |
113
+ | `top_p` | **0.9** | nucleus sampling |
114
+ | `top_k` | **50** | |
115
+ | `max_new_tokens` | **512** | |
116
+ | `num_ctx` | **4096** | context window |
117
+
118
+ ### ํ‰๊ฐ€ ๊ฒฐ๊ณผ (ORPO eval grid)
119
+
120
+ | ์„ค์ • | 3-gram ๋ฐ˜๋ณต๋ฅ  | 4-gram ๋ฐ˜๋ณต๋ฅ  | EOS ์ข…๋ฃŒ์œจ | ํ‰๊ท  ํ† ํฐ ์ˆ˜ |
121
+ |------|-------------|-------------|----------|------------|
122
+ | **t0.7 / rep1.2 (๊ถŒ์žฅ)** | **0.0%** | **0.0%** | **100%** | 189.2 |
123
+ | t0.8 / rep1.05 (๊ธฐ๋ณธ) | 4.7% | 2.3% | 100% | 221.4 |
124
+ | greedy (temp=0) | 30.89% | โ€” | 66.67% | โ€” |
125
+
126
+ > Ollama Q4_K_M ์‹ค์ธก: 3-gram ๋ฐ˜๋ณต 1.8% (์ž์—ฐ ์–ด์ ˆ ๋ฐ˜๋ณต), EOS 100% ์ข…๋ฃŒ ํ™•์ธ.
127
+ > greedy ๋Œ€๋น„ ๋ฐ˜๋ณต๋ฅ  **30.89% โ†’ 0%** ํ•ด์†Œ.
128
+
129
+ ### Transformers ์‚ฌ์šฉ ์˜ˆ์‹œ
130
+
131
+ ```python
132
+ from transformers import AutoModelForCausalLM, AutoTokenizer
133
+ import torch
134
+
135
+ model = AutoModelForCausalLM.from_pretrained("pathcosmos/frankenstallm")
136
+ tokenizer = AutoTokenizer.from_pretrained("pathcosmos/frankenstallm")
137
+
138
+ inputs = tokenizer("์•ˆ๋…•ํ•˜์„ธ์š”, ์˜ค๋Š˜ ๋‚ ์”จ๊ฐ€", return_tensors="pt")
139
+ outputs = model.generate(
140
+ **inputs,
141
+ temperature=0.7,
142
+ repetition_penalty=1.2,
143
+ top_p=0.9,
144
+ top_k=50,
145
+ max_new_tokens=512,
146
+ do_sample=True,
147
+ )
148
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
149
+ ```
150
+
151
  ## ์‚ฌ์šฉ
152
 
153
  - **Transformers**: ์ด ์ฒดํฌํฌ์ธํŠธ๋ฅผ ๊ทธ๋Œ€๋กœ `from_pretrained(...)` ๋กœ ๋กœ๋“œ ๊ฐ€๋Šฅ.