-
Hey, |
Beta Was this translation helpful? Give feedback.
Answered by
iofu728
Nov 27, 2023
Replies: 1 comment 3 replies
-
Hi @nogaeps, since macOS does not have CUDA, from llmlingua import PromptCompressor
llm_lingua = PromptCompressor(device_map="mps")
# or using other models
llm_lingua = PromptCompressor("lgaalves/gpt2-dolly", device_map="mps")
compressed_prompt = llm_lingua.compress_prompt(prompt, instruction="", question="", target_token=200) |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
iofu728
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @nogaeps, since macOS does not have CUDA,
you can use mps, please refer to the following code: