Instructions to use omdbusiness/amal 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 omdbusiness/amal 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 omdbusiness/amal:Q4_K_M # Run inference directly in the terminal: llama cli -hf omdbusiness/amal:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf omdbusiness/amal:Q4_K_M # Run inference directly in the terminal: llama cli -hf omdbusiness/amal:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf omdbusiness/amal:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf omdbusiness/amal:Q4_K_M
Use Docker
docker model run hf.co/omdbusiness/amal:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use omdbusiness/amal with Ollama:
ollama run hf.co/omdbusiness/amal:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use omdbusiness/amal with Docker Model Runner:
docker model run hf.co/omdbusiness/amal:Q4_K_M
- Lemonade
How to use omdbusiness/amal with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull omdbusiness/amal:Q4_K_M
Run and chat with the model
lemonade run user.amal-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Download bot.py from omdbusiness/amal: direct link, hf CLI and curl.
- Browser
- Download file 2.92 kB
-
https://huggingface.co/omdbusiness/amal/resolve/main/bot.py
- Command line
-
hf download hf://omdbusiness/amal/bot.py
-
curl -L -o bot.py https://huggingface.co/omdbusiness/amal/resolve/main/bot.py
2.92 kB
| import os | |
| import json | |
| import argparse | |
| import paramiko | |
| def load_servers(config_path='config.json'): | |
| """تحميل قائمة الخوادم من ملف إعدادات JSON""" | |
| try: | |
| with open(config_path, 'r') as f: | |
| data = json.load(f) | |
| return data.get('servers', []) | |
| except Exception as e: | |
| print(f"[!] Failed to load config: {e}") | |
| return [] | |
| def copy_file(server, local_file, remote_file): | |
| """نسخ ملف من الجهاز المحلي إلى الخادم عبر SSH""" | |
| try: | |
| ssh = paramiko.SSHClient() | |
| ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
| ssh.connect( | |
| hostname=server['host'], | |
| port=server.get('port', 22), | |
| username=server['username'], | |
| password=server['password'] | |
| ) | |
| sftp = ssh.open_sftp() | |
| sftp.put(local_file, remote_file) | |
| sftp.close() | |
| print(f"[+] Uploaded '{local_file}' to '{server['host']}:{remote_file}'") | |
| return ssh | |
| except Exception as e: | |
| print(f"[!] Failed to upload '{local_file}': {e}") | |
| return None | |
| def execute_remote_command(ssh, command): | |
| """تنفيذ أمر على الخادم عن بعد وطباعة النتيجة""" | |
| try: | |
| stdin, stdout, stderr = ssh.exec_command(command) | |
| output = stdout.read().decode() | |
| errors = stderr.read().decode() | |
| if output: | |
| print(f"[+] Output:\n{output}") | |
| if errors: | |
| print(f"[!] Errors:\n{errors}") | |
| except Exception as e: | |
| print(f"[!] Failed to execute command: {e}") | |
| def main(): | |
| parser = argparse.ArgumentParser(description="Upload files to server (optional).") | |
| parser.add_argument("files", nargs="*", help="Local files to upload (optional)") | |
| parser.add_argument("--remote-path", default="/tmp", help="Remote path to upload files to") | |
| parser.add_argument("--run", action="store_true", help="Execute main.py after upload") | |
| parser.add_argument("--config", default="config.json", help="Path to server config JSON file") | |
| args = parser.parse_args() | |
| if not args.files: | |
| print("[ℹ️] No files provided. Skipping file upload.") | |
| return # إنهاء لطيف بدون خطأ | |
| servers = load_servers(args.config) | |
| if not servers: | |
| print("[!] No servers loaded from config.") | |
| return | |
| server = servers[0] # استخدام أول سيرفر | |
| for file in args.files: | |
| if not os.path.exists(file): | |
| print(f"[!] File not found: {file}") | |
| continue | |
| remote_file = os.path.join(args.remote_path, os.path.basename(file)) | |
| ssh = copy_file(server, file, remote_file) | |
| if ssh and args.run and os.path.basename(file) == "main.py": | |
| execute_remote_command(ssh, f"python3 {remote_file}") | |
| ssh.close() | |
| if __name__ == "__main__": | |
| main() | |