Views
No views yet
1from ctransformers import AutoModelForCausalLM
2
3# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
4llm = AutoModelForCausalLM.from_pretrained("DeepMount00/Mistral-Ita-7b-GGUF", model_file="mistral_ita-7b-Q4_K_M.gguf", model_type="mistral", context_length=4096, max_new_tokens=1000, gpu_layers=20)
5
6prompt = "Trova la soluzione a questo problema: se Mario ha 12 mele e ne vende 4 a 8 euro e le restanti a 3 euro, quanto guadagna Mario?"
7
8print(llm(prompt))