I want to create an AI Friend AI guy which will take the role of the user preferences but seeing the price of AI subscription or the tokens API I don't know how to create one can you help me with solving this issue
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Creating a cost-effective AI Friend without relying on expensive API subscriptions is achievable using open-source tools and local deployment. Below is a step-by-step solution:
Step 1: Choose a Free/Open-Source AI Model
Avoid paid APIs by using lightweight, open-source language models that run locally. Options include:
Model
Use Case
Hardware Requirements
License
Llama 2
General-purpose chat
Moderate GPU/CPU
Meta (free)
Mistral-7B
Balanced performance
Mid-tier GPU
Apache 2.0
GPT-2
Simple interactions
Low-end CPU
MIT
Phi-2
Tiny model for edge devices
CPU-only
MIT
Recommendation: Start with Phi-2 (Microsoft’s tiny model) for CPU-only deployment or Llama 2 for better quality.
Step 2: Set Up the AI Locally
Use Python libraries to run the model on your machine (no API costs). Here’s a minimal example using Llama 2 with llama-cpp-python: