convert : partially revert PR #4818 (#5041)

This commit is contained in:
Jared Van Bortel 2024-01-20 18:14:18 -05:00 committed by GitHub
parent 97c1549808
commit b43ebde3b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 237 additions and 429 deletions

View file

@ -5,17 +5,16 @@ import json
import os
import struct
import sys
from pathlib import Path
from typing import Any, BinaryIO, Sequence
import numpy as np
import torch
from pathlib import Path
if 'NO_LOCAL_GGUF' not in os.environ:
sys.path.insert(1, str(Path(__file__).parent / 'gguf-py' / 'gguf'))
import gguf
NUMPY_TYPE_TO_FTYPE: dict[str, int] = {"float32": 0, "float16": 1}