mirror of
https://github.com/ollama/ollama.git
synced 2025-03-18 05:41:43 +01:00
duplicate token_embd to output
This commit is contained in:
parent
d368c039f0
commit
6b0486c216
@ -240,6 +240,9 @@ func New(r *os.File, params ml.BackendParams) (ml.Backend, error) {
|
||||
switch {
|
||||
case contains(t.Name, "position_embd", "token_embd", "token_norm_embd", "token_types"):
|
||||
createTensor(tensor{source: t}, input.bts)
|
||||
if _, ok := meta.Tensors().GroupLayers()["output"]; !ok && t.Name == "token_embd.weight" {
|
||||
createTensor(tensor{source: t, target: "output.weight"}, output.bts)
|
||||
}
|
||||
case contains(t.Name, "cls", "output", "output_norm"):
|
||||
createTensor(tensor{source: t}, output.bts)
|
||||
case strings.HasPrefix(t.Name, "v.") || strings.HasPrefix(t.Name, "mm."):
|
||||
|
Loading…
x
Reference in New Issue
Block a user