Views
No views yet
1# Pull the model from Hugging Face
2huggingface-cli download AshankGupta/tinyllama-email-reply tinyllama-chat.Q4_K_M.gguf --local-dir ./model
3
4# Or download directly
5curl -L -o model.gguf "https://huggingface.co/AshankGupta/tinyllama-email-reply/resolve/main/tinyllama-chat.Q4_K_M.gguf"
6
7# Create Ollama model
8ollama create tinyllama-email-reply -f Modelfile
9
10# Run
11ollama run tinyllama-email-reply1# Download GGUF file from Hugging Face
2curl -L -o tinyllama-email-reply.Q4_K_M.gguf \
3 "https://huggingface.co/AshankGupta/tinyllama-email-reply/resolve/main/tinyllama-chat.Q4_K_M.gguf"
4
5# Run inference
6./llama.cpp/llama-cli -m tinyllama-email-reply.Q4_K_M.gguf -p "Write a professional email reply to: Can you send the invoice by tomorrow?"1from llama_cpp import Llama
2
3model = Llama(
4 model_path="tinyllama-chat.Q4_K_M.gguf",
5 n_ctx=1024,
6)
7
8prompt = """You are an AI assistant that writes professional email replies.
9
10Email:
11Can you send the invoice by tomorrow?
12
13Reply:"""
14
15output = model(prompt, max_tokens=120)
16print(output["choices"][0]["text"])Instruction:
Generate a professional email reply.
Email:
Can you send the project report by tomorrow?
Reply:
Sure, I will send the report by tomorrow.Hi,
Can you send the invoice by tomorrow?Sure, I will send the invoice by tomorrow.