add conversion for microsoft phi 3 mini/medium 4k, 128

This commit is contained in:
Michael Yang
2024-06-03 15:53:58 -07:00
parent f7e3b9190f
commit 6ffb5cb017
7 changed files with 373 additions and 12 deletions

View File

@@ -157,6 +157,14 @@ type Tensor struct {
io.WriterTo `json:"-"`
}
func (t Tensor) block() (n int) {
if _, err := fmt.Sscanf(t.Name, "blk.%d.", &n); err != nil {
return -1
}
return
}
func (t Tensor) blockSize() uint64 {
switch t.Kind {
case 0, 1, 24, 25, 26, 27, 28, 30: // F32, F16, I8, I16, I32, I64, F64, BF16