Commit 7889cf3
Add transformer example with RoPE and MoE-like mechanisms (#3078)
* Implementation of linear_ layer for neural networks. This layer provides an optimized linear transformation for multi-dimensional inputs.
* Minor change
* Update dlib/dnn/layers.h
Co-authored-by: Copilot <[email protected]>
* Add reshape_to and flatten layers to Dlib's DNN module
* Missing update to "visitors.h"
* format fixing for reshape_to
* Update dlib/test/dnn.cpp
* Vocabulary size fixed for learning, and function added for transformation-free tokenization
* Added a new example for learning a “complex” Transformer model.
* Added a new example for learning a “complex” Transformer model.
* Updated example for training a Transformer model.
* fix for gcc/ffmpeg compilation
* Fix a warning message for Ubuntu compilation.
* Update for Linux environment.
* Fix batch building
* Slight improvement in model definition.
* linear_ layer implementation improvement
* finalizing the example
* Fixing break condition in training method.
* Fixing declaration order of variables.
* bpe_tokenizer improvements.
* Example updated.
* bpe_tokenizer class refactoring.
* Example updated.
* bpe_tokenizer class updated.
* Decoding part of the bpe_tokenizer updated.
* Network definition update
---------
Co-authored-by: Davis E. King <[email protected]>
Co-authored-by: Copilot <[email protected]>1 parent 131e46e commit 7889cf3
File tree
5 files changed
+1812
-331
lines changed- dlib
- dnn
- tokenizer
- examples
5 files changed
+1812
-331
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2329 | 2329 | | |
2330 | 2330 | | |
2331 | 2331 | | |
2332 | | - | |
| 2332 | + | |
2333 | 2333 | | |
2334 | 2334 | | |
2335 | 2335 | | |
2336 | 2336 | | |
2337 | 2337 | | |
2338 | 2338 | | |
2339 | | - | |
| 2339 | + | |
2340 | 2340 | | |
2341 | | - | |
| 2341 | + | |
2342 | 2342 | | |
2343 | 2343 | | |
2344 | 2344 | | |
2345 | 2345 | | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
2346 | 2369 | | |
2347 | 2370 | | |
2348 | | - | |
2349 | | - | |
| 2371 | + | |
2350 | 2372 | | |
2351 | 2373 | | |
2352 | 2374 | | |
| |||
2358 | 2380 | | |
2359 | 2381 | | |
2360 | 2382 | | |
| 2383 | + | |
2361 | 2384 | | |
2362 | 2385 | | |
2363 | 2386 | | |
| |||
2503 | 2526 | | |
2504 | 2527 | | |
2505 | 2528 | | |
2506 | | - | |
2507 | 2529 | | |
| 2530 | + | |
2508 | 2531 | | |
2509 | 2532 | | |
2510 | 2533 | | |
| |||
2515 | 2538 | | |
2516 | 2539 | | |
2517 | 2540 | | |
2518 | | - | |
| 2541 | + | |
2519 | 2542 | | |
2520 | 2543 | | |
2521 | 2544 | | |
| |||
0 commit comments