mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2025-09-23 15:15:26 +00:00
Simplify embedding vs linear layer code (#278)
This commit is contained in:
parent
bbe09e9799
commit
fa56c80402
@ -47,7 +47,7 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"PyTorch version: 2.1.0\n"
|
"PyTorch version: 2.3.1\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -373,7 +373,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"linear.weight = torch.nn.Parameter(embedding.weight.T.detach())"
|
"linear.weight = torch.nn.Parameter(embedding.weight.T)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user