-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
souzatharsis
committed
Dec 15, 2024
1 parent
86ae400
commit 3f9d131
Showing
38 changed files
with
1,627 additions
and
451 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+1005 Bytes
(100%)
tamingllms/_build/.doctrees/notebooks/output_size_limit.doctree
Binary file not shown.
Binary file modified
BIN
+1020 Bytes
(100%)
tamingllms/_build/.doctrees/notebooks/structured_output.doctree
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
312 changes: 257 additions & 55 deletions
312
tamingllms/_build/html/_sources/notebooks/alignment.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
tamingllms/_build/html/_static/alignment/alignment_simplified.d2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Models with consistent styling | ||
Alignment: { | ||
direction: right | ||
|
||
base: Base Model { | ||
shape: rectangle | ||
style.fill: "#FFA500" | ||
} | ||
|
||
sft: SFT Model { | ||
shape: rectangle | ||
style.fill: "#FFA500" | ||
} | ||
|
||
reward: Reward Model { | ||
shape: rectangle | ||
style.fill: "#FFA500" | ||
} | ||
|
||
aligned: Aligned Model { | ||
shape: rectangle | ||
style.fill: "#FFA500" | ||
} | ||
|
||
# Main flow connections | ||
base -> sft: Human Instructions | ||
sft -> aligned: PPO optimization { | ||
style.stroke-width: 2 | ||
} | ||
|
||
# Branch to reward model | ||
sft -> reward: Human\npreferences | ||
|
||
# Connection from reward to main flow | ||
reward -> aligned: Re-use preference\nprompts | ||
} | ||
|
||
direction: right |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Main container for models and explanations | ||
models: { | ||
direction: right | ||
|
||
base: Base Language Model { | ||
shape: rectangle | ||
style.fill: "#E8F6F3" | ||
style.stroke: "#2ECC71" | ||
} | ||
|
||
inst: Instruction-Tuned Model { | ||
shape: rectangle | ||
style.fill: "#FCF3CF" | ||
style.stroke: "#F4D03F" | ||
} | ||
|
||
aligned: Aligned Model { | ||
shape: rectangle | ||
style.fill: "#EBF5FB" | ||
style.stroke: "#3498DB" | ||
} | ||
|
||
# Main progression | ||
base -> inst -> aligned | ||
|
||
# Direct alignment path | ||
base -> aligned: { | ||
style.stroke-dash: 5 | ||
} | ||
} | ||
|
||
# Notes under models | ||
base_note: Next-Token Prediction { | ||
shape: rectangle | ||
style.fill: "#FFFFFF" | ||
style.stroke: "#2ECC71" | ||
style.stroke-dash: 3 | ||
} | ||
|
||
inst_note: Task-Specific { | ||
shape: rectangle | ||
style.fill: "#FFFFFF" | ||
style.stroke: "#F4D03F" | ||
style.stroke-dash: 3 | ||
} | ||
|
||
aligned_note: Human Preference-Aligned { | ||
shape: rectangle | ||
style.fill: "#FFFFFF" | ||
style.stroke: "#3498DB" | ||
style.stroke-dash: 3 | ||
} | ||
|
||
# Connect models to notes | ||
models.base -> base_note: { | ||
direction: down | ||
} | ||
|
||
models.inst -> inst_note: { | ||
direction: down | ||
} | ||
|
||
models.aligned -> aligned_note: { | ||
direction: down | ||
} | ||
|
||
direction: right |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
312 changes: 257 additions & 55 deletions
312
tamingllms/_build/jupyter_execute/notebooks/alignment.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Models with consistent styling | ||
Alignment: { | ||
direction: right | ||
|
||
base: Base Model { | ||
shape: rectangle | ||
style.fill: "#FFA500" | ||
} | ||
|
||
sft: SFT Model { | ||
shape: rectangle | ||
style.fill: "#FFA500" | ||
} | ||
|
||
reward: Reward Model { | ||
shape: rectangle | ||
style.fill: "#FFA500" | ||
} | ||
|
||
aligned: Aligned Model { | ||
shape: rectangle | ||
style.fill: "#FFA500" | ||
} | ||
|
||
# Main flow connections | ||
base -> sft: Human Instructions | ||
sft -> aligned: PPO optimization { | ||
style.stroke-width: 2 | ||
} | ||
|
||
# Branch to reward model | ||
sft -> reward: Human\npreferences | ||
|
||
# Connection from reward to main flow | ||
reward -> aligned: Re-use preference\nprompts | ||
} | ||
|
||
direction: right |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Main container for models and explanations | ||
models: { | ||
direction: right | ||
|
||
base: Base Language Model { | ||
shape: rectangle | ||
style.fill: "#E8F6F3" | ||
style.stroke: "#2ECC71" | ||
} | ||
|
||
inst: Instruction-Tuned Model { | ||
shape: rectangle | ||
style.fill: "#FCF3CF" | ||
style.stroke: "#F4D03F" | ||
} | ||
|
||
aligned: Aligned Model { | ||
shape: rectangle | ||
style.fill: "#EBF5FB" | ||
style.stroke: "#3498DB" | ||
} | ||
|
||
# Main progression | ||
base -> inst -> aligned | ||
|
||
# Direct alignment path | ||
base -> aligned: { | ||
style.stroke-dash: 5 | ||
} | ||
} | ||
|
||
# Notes under models | ||
base_note: Next-Token Prediction { | ||
shape: rectangle | ||
style.fill: "#FFFFFF" | ||
style.stroke: "#2ECC71" | ||
style.stroke-dash: 3 | ||
} | ||
|
||
inst_note: Task-Specific { | ||
shape: rectangle | ||
style.fill: "#FFFFFF" | ||
style.stroke: "#F4D03F" | ||
style.stroke-dash: 3 | ||
} | ||
|
||
aligned_note: Human Preference-Aligned { | ||
shape: rectangle | ||
style.fill: "#FFFFFF" | ||
style.stroke: "#3498DB" | ||
style.stroke-dash: 3 | ||
} | ||
|
||
# Connect models to notes | ||
models.base -> base_note: { | ||
direction: down | ||
} | ||
|
||
models.inst -> inst_note: { | ||
direction: down | ||
} | ||
|
||
models.aligned -> aligned_note: { | ||
direction: down | ||
} | ||
|
||
direction: right |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.