How can i correctly use a CPU to perform inference of a quantized model #1374
Unanswered
neavo
asked this question in
CATCH-ALL: alpha testing the `multi-backend-refactor`
Replies: 1 comment
|
For CPU NER, skip bitsandbytes. Export to ONNX Runtime / OpenVINO, or load the model in plain fp16/fp32: model = AutoModelForTokenClassification.from_pretrained(
"resource/kg_ner_gpu",
torch_dtype=torch.float32,
device_map="cpu",
)If you have a GPU, drop If the checkpoint was saved already quantized, |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I made some attempts, such as:
But the speed is very slow, so is there a correct code snippet as an example?
All reactions