meforce commited on
Commit
013b23b
·
verified ·
1 Parent(s): b44749f

Delete README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -680
README.md DELETED
@@ -1,680 +0,0 @@
1
- ---
2
- pipeline_tag: text-generation
3
- inference: false
4
- language:
5
- - en
6
- - tr
7
- - de
8
- - fr
9
- - es
10
- - pt
11
- - it
12
- - nl
13
- - pl
14
- - ru
15
- - uk
16
- - ar
17
- - fa
18
- - hi
19
- - bn
20
- - ur
21
- - id
22
- - vi
23
- - th
24
- - zh
25
- - ja
26
- - ko
27
- tags:
28
- - cetinlm
29
- - me-force-technology
30
- - text-generation
31
- - causal-lm
32
- - base-model
33
- - from-scratch
34
- - multilingual
35
- - turkish
36
- - gqa
37
- - rope
38
- - pytorch
39
- - research
40
- - single-gpu-training
41
- ---
42
-
43
- # CetinLM-1B Base
44
-
45
- > **A from-scratch language-model research program built in Türkiye, designed for global use.**
46
- >
47
- > **Status:** Active base pretraining · Research preview · Weights not yet released
48
-
49
- **CetinLM-1B is not the final product. It is the first instrument in the laboratory.**
50
-
51
- CetinLM is an independent language-model research program focused on a simple question:
52
-
53
- > **How much useful capability can disciplined architecture, data, training-systems, diagnostics, post-training, and inference engineering extract from every parameter and every unit of compute before scale becomes the answer?**
54
-
55
- The 1B model is our controlled research scale: small enough to inspect deeply, large enough for real language-model behavior to emerge.
56
-
57
- We are building the stack from first principles, measuring it while it trains, publishing both successful and failed experiments, and turning those findings into a repeatable methodology for future CetinLM models.
58
-
59
- **Built in Türkiye 🇹🇷. Engineered for a global audience.**
60
-
61
- ---
62
-
63
- ## Research Preview
64
-
65
- This repository currently documents an **actively trained raw base model**.
66
-
67
- It is **not yet an instruction model, chat model, reasoning model, or production release**.
68
-
69
- At this stage, CetinLM-1B performs causal next-token prediction. Conversation behavior, instruction following, preference alignment, reasoning specialization, code specialization, and production inference optimization are planned as later phases.
70
-
71
- ### Latest published training snapshot
72
-
73
- | Item | Value |
74
- |---|---:|
75
- | Model | CetinLM-1B Base |
76
- | Parameters | **1,048,780,544** |
77
- | Training step | **73,000** |
78
- | Processed training tokens | **598,016,000** |
79
- | Initial base-pretraining target | **1,000,000,000 tokens** |
80
- | Progress | **59.80%** |
81
- | Best validation loss | **3.622009** |
82
- | Best validation perplexity | **37.413** |
83
- | Training hardware | **1× NVIDIA RTX 4070 Ti SUPER 16 GB** |
84
- | Training precision | **BF16** |
85
- | Current training sequence length | **256 tokens** |
86
-
87
- > These numbers are a dated research snapshot, not a claim of final model quality. Training is continuing.
88
-
89
- ---
90
-
91
- # Why CetinLM Exists
92
-
93
- The project is not based on the thesis that parameter count is irrelevant.
94
-
95
- Scale matters.
96
-
97
- The research question is what happens **before** scale is used as the default solution.
98
-
99
- Modern language models contain many interacting systems:
100
-
101
- - architecture,
102
- - tokenizer design,
103
- - corpus construction,
104
- - document boundaries,
105
- - language mixture,
106
- - optimization,
107
- - batch geometry,
108
- - activation memory,
109
- - attention kernels,
110
- - checkpointing,
111
- - evaluation methodology,
112
- - context training,
113
- - post-training,
114
- - decoding,
115
- - serving,
116
- - and hardware utilization.
117
-
118
- CetinLM treats these as an engineering system rather than independent checkboxes.
119
-
120
- The goal is not:
121
-
122
- > “Can a 1B model run on a consumer GPU?”
123
-
124
- The more interesting question is:
125
-
126
- > **“Can we develop a model-building methodology at 1B that remains useful when the same engineering discipline is applied at much larger scales?”**
127
-
128
- CetinLM-1B is the test bench for that question.
129
-
130
- ---
131
-
132
- # Model Architecture
133
-
134
- CetinLM-1B is a decoder-only causal Transformer trained from scratch.
135
-
136
- | Component | Configuration |
137
- |---|---:|
138
- | Parameters | 1,048,780,544 |
139
- | Vocabulary | 65,536 |
140
- | Hidden size | 1,792 |
141
- | Transformer layers | 20 |
142
- | Query heads | 28 |
143
- | KV heads | 7 |
144
- | Attention | Grouped-Query Attention (GQA) |
145
- | Head dimension | 64 |
146
- | MLP intermediate size | 7,168 |
147
- | Position encoding | Rotary Position Embeddings (RoPE) |
148
- | RoPE theta | 10,000 |
149
- | Configured maximum sequence length | 4,096 |
150
- | Current pretraining sequence length | 256 |
151
- | Bias | False |
152
- | Dropout | 0.0 |
153
- | Input/output embeddings | Tied |
154
- | Objective | Causal next-token prediction |
155
-
156
- ### Important context-length note
157
-
158
- The architecture is configured for sequences up to 4,096 tokens, but the current v0 base-pretraining run uses **256-token training sequences**.
159
-
160
- A configured maximum context length is not the same as a context length that has been sufficiently trained and validated.
161
-
162
- Long-context capability will therefore be treated as a separate research stage rather than claimed prematurely.
163
-
164
- ---
165
-
166
- # Tokenizer and Language Coverage
167
-
168
- CetinLM uses a custom **65,536-token multilingual tokenizer**.
169
-
170
- Current training data includes material from the following language set:
171
-
172
- `en, tr, de, fr, es, pt, it, nl, pl, ru, uk, ar, fa, hi, bn, ur, id, vi, th, zh, ja, ko`
173
-
174
- English and Turkish receive elevated weight in the current data mixture.
175
-
176
- Special tokens:
177
-
178
- | Token | Role |
179
- |---|---|
180
- | `<pad>` | Padding |
181
- | `<unk>` | Unknown token |
182
- | `<bos>` | Beginning of sequence/document |
183
- | `<eos>` | End of sequence/document |
184
-
185
- Language inclusion in the training mixture does **not** imply equal capability across all listed languages. Language-specific evaluation will be expanded as training progresses.
186
-
187
- ---
188
-
189
- # Training System
190
-
191
- The current run is optimized for a single 16 GB GPU without changing the effective optimization target.
192
-
193
- ### Current stable training configuration
194
-
195
- | Setting | Value |
196
- |---|---:|
197
- | Micro-batch size | 8 |
198
- | Gradient accumulation | 4 |
199
- | Sequence length | 256 |
200
- | Effective tokens / optimizer step | 8,192 |
201
- | Optimizer | AdamW8bit |
202
- | Peak learning rate | 2e-4 |
203
- | Minimum learning rate | 2e-5 |
204
- | LR schedule | Warmup + cosine decay |
205
- | Warmup | 2,000 optimizer steps |
206
- | Adam betas | 0.9 / 0.95 |
207
- | Weight decay | 0.1 |
208
- | Gradient clipping | 1.0 |
209
- | Precision | BF16 |
210
- | Activation memory | Transformer-block gradient checkpointing |
211
- | DataLoader workers | 0 |
212
- | Pinned memory | Enabled |
213
-
214
- Observed steady-state training throughput is approximately **5.6K tokens/second** on the current system.
215
-
216
- The project began with a substantially slower training geometry. Batch/accumulation experiments preserving the same effective 8,192-token optimizer step increased throughput by roughly **2.7×** relative to the initial configuration.
217
-
218
- The optimization principle is:
219
-
220
- > **Profile → form a hypothesis → A/B test on the real model → merge only if it wins.**
221
-
222
- ---
223
-
224
- # Kernel-Level Profiling and SDPA Research
225
-
226
- CetinLM does not assume that a theoretically attractive backend is faster on the actual training system.
227
-
228
- The training stack was profiled at operator/kernel level, revealing that matrix multiplication, activation-checkpointed forward computation, copies, pointwise operations, and attention were the dominant areas worth investigating.
229
-
230
- A controlled SDPA backend study was then performed using the real CetinLM-1B training shape.
231
-
232
- Current environment at the time of the study:
233
-
234
- - Windows
235
- - PyTorch 2.11.0 + CUDA 12.8
236
- - NVIDIA RTX 4070 Ti SUPER
237
- - BF16
238
- - batch 8
239
- - sequence length 256
240
- - 28 query heads / 7 KV heads
241
-
242
- ### Result
243
-
244
- | Candidate | Relative result |
245
- |---|---:|
246
- | Native Math SDPA + native GQA | **Winner / baseline** |
247
- | cuDNN SDPA + native GQA | ~68.5% slower |
248
- | Math SDPA with BF16 reduction switch | ~44.8% slower |
249
- | Efficient SDPA with explicit KV expansion | ~48.2% slower |
250
- | Flash SDPA | Unavailable in the tested PyTorch/Windows build |
251
-
252
- This was an important negative result.
253
-
254
- The profiler initially made the Math SDPA path look suspicious. Measurement showed that it was actually the best available backend for this specific system and shape.
255
-
256
- **No backend change was made.**
257
-
258
- Failed optimizations are treated as research output rather than hidden experiments.
259
-
260
- ---
261
-
262
- # Scientific Diagnostic: What Is the Base Model Actually Learning?
263
-
264
- Generation samples alone can be misleading, especially for a raw base model.
265
-
266
- CetinLM therefore tracks fixed next-token semantic probes across checkpoints and measures where the expected target appears in the full vocabulary distribution.
267
-
268
- A target moving from rank 200 to rank 2 is meaningful even if greedy generation is still repetitive.
269
-
270
- ### Earlier checkpoint → Step 70K
271
-
272
- | Probe | Earlier target rank | Step 70K rank |
273
- |---|---:|---:|
274
- | `The capital of France is` → `Paris` | ~211 | **2** |
275
- | `Paris is the capital of` → `France` | 2 | **2** |
276
- | `The opposite of hot is` → `cold` | 13 | **3** |
277
- | `Water freezes at` → `0` | 17 | **13** |
278
- | `2 + 2 =` → `4` | 5 | **4** |
279
- | `Türkiye'nin başkenti` → `Ankara` | 6 | **1** |
280
- | `Ankara, Türkiye'nin` → `başkenti` | ~10 | **36** |
281
-
282
- Aggregate target placement:
283
-
284
- | Metric | Earlier | Step 70K |
285
- |---|---:|---:|
286
- | Top-1 | 0 / 7 | **1 / 7** |
287
- | Top-5 | 2 / 7 | **5 / 7** |
288
- | Top-20 | 6 / 7 | **6 / 7** |
289
-
290
- Two examples are especially useful:
291
-
292
- ```text
293
- The capital of France is
294
- Target: Paris
295
- Earlier rank: ~211
296
- Step 70K rank: 2
297
- ```
298
-
299
- ```text
300
- Türkiye'nin başkenti
301
- Target: Ankara
302
- Earlier rank: 6
303
- Step 70K rank: 1
304
- ```
305
-
306
- These measurements do not prove general intelligence or benchmark superiority.
307
-
308
- They do show that the model's probability distribution is becoming substantially sharper around several learned semantic relations as pretraining progresses.
309
-
310
- ---
311
-
312
- # Validation Trajectory
313
-
314
- Recent best checkpoints:
315
-
316
- | Step | Processed tokens | Validation loss | PPL |
317
- |---:|---:|---:|---:|
318
- | 58K | 475.1M | 3.753456 | 42.668 |
319
- | 59K | 483.3M | 3.735000 | 41.888 |
320
- | 60K | 491.5M | 3.711722 | 40.924 |
321
- | 63K | 516.1M | 3.693981 | 40.205 |
322
- | 67K | 548.9M | 3.677402 | 39.544 |
323
- | 69K | 565.2M | 3.667538 | 39.155 |
324
- | 70K | 573.4M | 3.650751 | 38.504 |
325
- | 71K | 581.6M | 3.639504 | 38.073 |
326
- | 72K | 589.8M | 3.626853 | 37.594 |
327
- | 73K | 598.0M | **3.622009** | **37.413** |
328
-
329
- At the latest published snapshot, the model is still establishing new validation lows.
330
-
331
- ---
332
-
333
- # Generation Behavior at This Stage
334
-
335
- CetinLM-1B is currently a **raw base model**.
336
-
337
- It should not be evaluated as though it were an instruction-tuned assistant.
338
-
339
- For example, the base model has learned enough signal to produce continuations such as:
340
-
341
- ```text
342
- Prompt:
343
- The capital of France is
344
-
345
- Continuation:
346
- The capital of France is the city of Paris...
347
- ```
348
-
349
- but greedy decoding can then fall into repetition:
350
-
351
- ```text
352
- The city of Paris is the city of Paris...
353
- ```
354
-
355
- Other raw-base behaviors include:
356
-
357
- - repeating a question rather than answering it,
358
- - local phrase loops,
359
- - weak stopping behavior under some decoding conditions,
360
- - factual inconsistency in longer continuations,
361
- - weak arithmetic,
362
- - sensitivity to prompt phrasing.
363
-
364
- These are documented rather than hidden.
365
-
366
- Instruction following, conversational behavior, reasoning, code specialization, and preference alignment belong to later training phases.
367
-
368
- ---
369
-
370
- # Corpus Boundary Audit
371
-
372
- A generation-quality discussion raised a concrete engineering question:
373
-
374
- > Was EOS actually present at document boundaries in the tokenized training shards?
375
-
376
- Instead of guessing, the full 1B-token corpus was audited.
377
-
378
- ### Audit results
379
-
380
- | Metric | Training | Validation |
381
- |---|---:|---:|
382
- | Tokens | 1,000,000,000 | 10,000,000 |
383
- | EOS tokens | 1,884,722 | 18,952 |
384
- | EOS / 1M tokens | 1,884.72 | 1,895.20 |
385
-
386
- The train and validation EOS rates are closely aligned.
387
-
388
- Decoded boundary windows confirmed that EOS tokens occur at real document endings.
389
-
390
- ### Technical debt discovered
391
-
392
- Many inspected boundaries use:
393
-
394
- ```text
395
- <eos><eos><bos>
396
- ```
397
-
398
- rather than the intended future representation:
399
-
400
- ```text
401
- <eos><bos>
402
- ```
403
-
404
- This redundant second EOS is **not currently classified as a critical failure**:
405
-
406
- - the semantic document boundary is correct,
407
- - train/validation boundary statistics align,
408
- - validation continues to improve,
409
- - changing the already-tokenized corpus halfway through v0 would alter the data distribution mid-run.
410
-
411
- The current 1B-token run therefore remains unchanged.
412
-
413
- The next corpus builder will remove redundant EOS insertion and add automated boundary invariants.
414
-
415
- Planned checks include:
416
-
417
- - double-EOS count,
418
- - EOS/BOS boundary correctness,
419
- - special-token frequencies,
420
- - document count,
421
- - tokens per document,
422
- - missing/broken boundaries.
423
-
424
- ---
425
-
426
- # What We Refuse to Hide
427
-
428
- CetinLM is being developed as an engineering and research program, not as a polished demo first.
429
-
430
- That means public documentation includes:
431
-
432
- - hypotheses that failed,
433
- - optimizations that benchmarked worse,
434
- - training limitations,
435
- - data-pipeline technical debt,
436
- - diagnostic regressions,
437
- - generation failures,
438
- - and decisions to **not** change the model when the evidence does not justify intervention.
439
-
440
- A healthy experiment is more valuable than a perfect-looking progress post.
441
-
442
- ---
443
-
444
- # Roadmap
445
-
446
- ## Phase I — CetinLM-1B Base v0
447
-
448
- Current objective:
449
-
450
- ```text
451
- 1.049B parameters
452
- 1B base-pretraining tokens
453
- fixed 256-token training sequences
454
- single-GPU research baseline
455
- ```
456
-
457
- At 1B tokens, v0 will be frozen and evaluated comprehensively.
458
-
459
- ---
460
-
461
- ## Phase II — Continued Pretraining
462
-
463
- The next stage will continue from the trained checkpoint rather than restart the model.
464
-
465
- Training will be evaluated in controlled **+1B-token milestones**:
466
-
467
- ```text
468
- 1B total -> freeze + benchmark
469
- 2B total -> freeze + benchmark
470
- 3B total -> freeze + benchmark
471
- 4B total -> freeze + benchmark
472
- 5B total -> comprehensive evaluation
473
- ```
474
-
475
- The goal is to retain control points rather than treating continued pretraining as one opaque run.
476
-
477
- ---
478
-
479
- ## Phase III — Dynamic-Length Training
480
-
481
- CetinLM will not simply force every document through a 4,096-token sequence.
482
-
483
- The planned trainer uses document-length-aware buckets:
484
-
485
- ```text
486
- short documents -> 256 / 512
487
- medium documents -> 1024 / 2048
488
- long documents -> 4096
489
- ```
490
-
491
- with:
492
-
493
- - length bucketing,
494
- - EOS-aware sequence packing,
495
- - token-budgeted batching,
496
- - dynamic micro-batch sizing,
497
- - minimum practical padding,
498
- - explicit exposure to long-context samples.
499
-
500
- Conceptually:
501
-
502
- ```text
503
- 180-token document -> 256 bucket
504
- 430-token document -> 512 bucket
505
- 900-token document -> 1024 bucket
506
- 1700-token document -> 2048 bucket
507
- 3500-token document -> 4096 bucket
508
- ```
509
-
510
- The research objective is to train long-context capability without paying 4,096-token attention cost for every short document.
511
-
512
- ---
513
-
514
- ## Phase IV — Post-Training
515
-
516
- Planned post-training work includes:
517
-
518
- - general instruction SFT,
519
- - chat/conversation SFT,
520
- - stronger Turkish and English instruction data,
521
- - math and reasoning,
522
- - code,
523
- - CetinLM identity and project knowledge,
524
- - preference/alignment work,
525
- - systematic decoding evaluation.
526
-
527
- ---
528
-
529
- ## Phase V — Inference Engineering
530
-
531
- Planned runtime work includes:
532
-
533
- - KV cache,
534
- - faster autoregressive generation,
535
- - memory optimization,
536
- - serving/runtime profiling,
537
- - deployment-oriented quantization research,
538
- - API/runtime integration.
539
-
540
- ---
541
-
542
- # Intended Use
543
-
544
- The current repository is primarily intended for:
545
-
546
- - language-model research,
547
- - training-systems research,
548
- - small-model efficiency research,
549
- - reproducibility and engineering documentation,
550
- - multilingual base-model experimentation,
551
- - future post-training research.
552
-
553
- When weights are released, intended-use guidance will be expanded for the specific checkpoint being published.
554
-
555
- ---
556
-
557
- # Current Limitations
558
-
559
- The current research checkpoint:
560
-
561
- - is not instruction tuned,
562
- - is not a finished chat assistant,
563
- - has only been trained on 256-token sequences in the current v0 run,
564
- - can produce repetitive greedy generations,
565
- - can hallucinate facts,
566
- - has weak arithmetic/reasoning relative to later planned stages,
567
- - may behave inconsistently across languages,
568
- - has not yet undergone comprehensive safety/alignment post-training,
569
- - should not be used for high-stakes decisions.
570
-
571
- No claim is made that a 1B model replaces frontier-scale systems.
572
-
573
- The research thesis is about **capability extracted per parameter and per unit of compute**, and whether that methodology remains valuable when scaled.
574
-
575
- ---
576
-
577
- # Release Status
578
-
579
- ### Model weights
580
-
581
- **Not yet released.**
582
-
583
- The model is still in active base pretraining.
584
-
585
- Weights will not be published merely to satisfy a calendar date. A release will follow a defined research milestone and evaluation pass.
586
-
587
- ### Hosted inference
588
-
589
- Disabled for this research-preview repository.
590
-
591
- The architecture currently uses a custom PyTorch implementation, and no claim is being made yet about drop-in compatibility with Hugging Face Transformers or hosted inference providers.
592
-
593
- ### License
594
-
595
- A model-weight license will be selected deliberately before the first public weight release.
596
-
597
- No license metadata is asserted here before that decision is made.
598
-
599
- ---
600
-
601
- # Project Links
602
-
603
- - **Website:** https://cetinlm.meforcetechnology.com
604
- - **GitHub:** https://github.com/xertxetin/CetinLM
605
- - **Hugging Face:** https://huggingface.co/meforce
606
-
607
- The GitHub repository contains public engineering and research logs covering training optimization, diagnostics, profiling, backend experiments, and milestone evaluations.
608
-
609
- ---
610
-
611
- # Origin
612
-
613
- CetinLM is developed independently under **Me Force Technology**.
614
-
615
- The research program originates in **Türkiye** and is built for global research, engineering, and future deployment.
616
-
617
- We believe globally relevant model research does not need to begin with the largest cluster.
618
-
619
- It can begin with a controlled experiment, a measurable hypothesis, and the discipline to understand the system before scaling it.
620
-
621
- ---
622
-
623
- # Research Philosophy
624
-
625
- We do not treat parameter count as a substitute for engineering.
626
-
627
- We do not treat a lower validation loss as proof that every capability improved.
628
-
629
- We do not treat a compelling generation sample as a benchmark.
630
-
631
- We do not treat a profiler suspicion as an optimization result.
632
-
633
- We do not merge an optimization because it sounds theoretically better.
634
-
635
- We measure.
636
-
637
- And when the measurement says the existing system is better, we keep it.
638
-
639
- > **Compute is not the experiment. Engineering is.**
640
-
641
- CetinLM-1B is the first instrument in the lab.
642
-
643
- The larger project is the methodology behind what comes next.
644
-
645
- ---
646
-
647
- # Citation
648
-
649
- If you reference the CetinLM research program or its public engineering results, please cite the project repository:
650
-
651
- ```bibtex
652
- @misc{cetinlm2026,
653
- title = {CetinLM: From-Scratch Language Model Research Program},
654
- author = {CetinLM Research Program, Me Force Technology},
655
- year = {2026},
656
- howpublished = {\url{https://github.com/xertxetin/CetinLM}},
657
- note = {Independent language-model research originating in Türkiye}
658
- }
659
- ```
660
-
661
- ---
662
-
663
- # Transparency Note
664
-
665
- Metrics in this card are reported from specific checkpoints and diagnostic scripts used during an active research run.
666
-
667
- They should be read as **experimental observations**, not as claims of benchmark leadership.
668
-
669
- As CetinLM evolves, this card will be updated with:
670
-
671
- - frozen checkpoint identifiers,
672
- - standardized evaluations,
673
- - data documentation,
674
- - context evaluations,
675
- - model artifacts,
676
- - inference instructions,
677
- - post-training results,
678
- - and release-specific limitations.
679
-
680
- **Last research snapshot documented here:** Step 73,000 · 598,016,000 processed tokens · 2026-08-30.