Text Generation
PyTorch
GGUF
English
quantum
quantum-entropy
from-scratch
char-level
cosmic-synapse-theory
custom-architecture
llama-cpp
continual-learning
reproducible-seed
open-science
null-results
Instructions to use phera-ra/QC67_cosmo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use phera-ra/QC67_cosmo with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf phera-ra/QC67_cosmo # Run inference directly in the terminal: llama cli -hf phera-ra/QC67_cosmo
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf phera-ra/QC67_cosmo # Run inference directly in the terminal: llama cli -hf phera-ra/QC67_cosmo
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf phera-ra/QC67_cosmo # Run inference directly in the terminal: ./llama-cli -hf phera-ra/QC67_cosmo
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf phera-ra/QC67_cosmo # Run inference directly in the terminal: ./build/bin/llama-cli -hf phera-ra/QC67_cosmo
Use Docker
docker model run hf.co/phera-ra/QC67_cosmo
- LM Studio
- Jan
- vLLM
How to use phera-ra/QC67_cosmo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "phera-ra/QC67_cosmo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "phera-ra/QC67_cosmo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/phera-ra/QC67_cosmo
- Ollama
How to use phera-ra/QC67_cosmo with Ollama:
ollama run hf.co/phera-ra/QC67_cosmo
- Unsloth Studio
How to use phera-ra/QC67_cosmo with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for phera-ra/QC67_cosmo to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for phera-ra/QC67_cosmo to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for phera-ra/QC67_cosmo to start chatting
- Docker Model Runner
How to use phera-ra/QC67_cosmo with Docker Model Runner:
docker model run hf.co/phera-ra/QC67_cosmo
- Lemonade
How to use phera-ra/QC67_cosmo with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull phera-ra/QC67_cosmo
Run and chat with the model
lemonade run user.QC67_cosmo-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
| #!/usr/bin/env python3 | |
| """ | |
| REST API for Creature Weights System | |
| Use on any platform - creatures travel everywhere! | |
| """ | |
| import json | |
| from pathlib import Path | |
| from datetime import datetime | |
| import sys | |
| sys.path.insert(0, '.') | |
| try: | |
| from flask import Flask, request, jsonify | |
| except ImportError: | |
| print("Flask not found. Install with: pip install flask") | |
| Flask = None | |
| from creature_system import CreatureManager, Creature | |
| app = Flask(__name__) if Flask else None | |
| manager = CreatureManager("creatures") | |
| # ============================================================ | |
| # API ENDPOINTS | |
| # ============================================================ | |
| def list_creatures(): | |
| """List all creatures.""" | |
| return jsonify([c.get_status() for c in | |
| [Creature(d.name) for d in Path("creatures").iterdir() if d.is_dir()]]) | |
| def get_creature(name): | |
| """Get specific creature status.""" | |
| try: | |
| creature = Creature(name) | |
| return jsonify(creature.get_status()) | |
| except: | |
| return jsonify({"error": f"Creature {name} not found"}), 404 | |
| def learn(name): | |
| """Creature learns from interaction.""" | |
| data = request.json | |
| user_input = data.get("input", "") | |
| creature_output = data.get("output", "") | |
| try: | |
| creature = Creature(name) | |
| creature.learn_from_interaction(user_input, creature_output) | |
| return jsonify({ | |
| "status": "learned", | |
| "creature": name, | |
| "concepts": len(creature.weights["salience"]), | |
| "associations": len(creature.weights["assoc"]), | |
| "turns": creature.weights["n"] | |
| }) | |
| except Exception as e: | |
| return jsonify({"error": str(e)}), 400 | |
| def get_weights(name): | |
| """Download creature's weights (JSON).""" | |
| try: | |
| creature = Creature(name) | |
| return jsonify(creature.export_portable()) | |
| except: | |
| return jsonify({"error": f"Creature {name} not found"}), 404 | |
| def import_weights(name): | |
| """Import weights from another platform.""" | |
| data = request.json | |
| try: | |
| creature = Creature(name) | |
| creature.import_portable(data) | |
| return jsonify({"status": "imported", "creature": name}) | |
| except Exception as e: | |
| return jsonify({"error": str(e)}), 400 | |
| def get_modelfile(name): | |
| """Get Ollama Modelfile for creature.""" | |
| try: | |
| creature = Creature(name) | |
| return app.response_class( | |
| response=creature.generate_modelfile(), | |
| status=200, | |
| mimetype='text/plain' | |
| ) | |
| except: | |
| return jsonify({"error": f"Creature {name} not found"}), 404 | |
| def create_creature(): | |
| """Birth a new creature.""" | |
| data = request.json | |
| name = data.get("name") | |
| owner = data.get("owner") | |
| if not name: | |
| return jsonify({"error": "name required"}), 400 | |
| try: | |
| creature = manager.create_creature(name, owner) | |
| return jsonify({ | |
| "status": "created", | |
| "creature": creature.get_status() | |
| }), 201 | |
| except Exception as e: | |
| return jsonify({"error": str(e)}), 400 | |
| def export_all(): | |
| """Export all creatures (portable for any platform).""" | |
| try: | |
| portable = manager.export_all_creatures() | |
| return jsonify(portable) | |
| except Exception as e: | |
| return jsonify({"error": str(e)}), 400 | |
| # ============================================================ | |
| # CLI for testing (no Flask) | |
| # ============================================================ | |
| if __name__ == "__main__": | |
| if Flask and len(sys.argv) > 1 and sys.argv[1] == "serve": | |
| print("Starting REST API on http://localhost:5000") | |
| print("Endpoints:") | |
| print(" GET /api/creatures - list all creatures") | |
| print(" POST /api/creature - create creature") | |
| print(" GET /api/creature/<name> - get creature") | |
| print(" POST /api/creature/<name>/learn - learn from interaction") | |
| print(" GET /api/creature/<name>/weights - download weights") | |
| print(" POST /api/creature/<name>/weights - import weights") | |
| print(" GET /api/creature/<name>/modelfile - get Ollama modelfile") | |
| print(" GET /api/export-all - export all creatures\n") | |
| app.run(debug=True, port=5000) | |
| else: | |
| print("Usage: python creature_api.py serve") | |
| print("\nOr import for direct use:") | |
| print(" from creature_api import app, manager") | |