Text Generation
Transformers
Safetensors
English
llama
thinking
reasoning
instruct
economics
finance
analysis
llama3.3
unsloth
finetune
bfloat16
128k context
conversational
text-generation-inference
Instructions to use Gaston895/aegisconduct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Gaston895/aegisconduct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Gaston895/aegisconduct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Gaston895/aegisconduct") model = AutoModelForCausalLM.from_pretrained("Gaston895/aegisconduct") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Gaston895/aegisconduct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Gaston895/aegisconduct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gaston895/aegisconduct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Gaston895/aegisconduct
- SGLang
How to use Gaston895/aegisconduct with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Gaston895/aegisconduct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gaston895/aegisconduct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Gaston895/aegisconduct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gaston895/aegisconduct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use Gaston895/aegisconduct 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 Gaston895/aegisconduct 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 Gaston895/aegisconduct to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Gaston895/aegisconduct to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Gaston895/aegisconduct", max_seq_length=2048, ) - Docker Model Runner
How to use Gaston895/aegisconduct with Docker Model Runner:
docker model run hf.co/Gaston895/aegisconduct
Upload reco.py to root directory (final structure)
Browse files
reco.py
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""
|
| 3 |
+
Script to move model files from the 'econ' subdirectory to the root directory
|
| 4 |
+
for the Hugging Face repository: Gaston895/aegisconduct
|
| 5 |
+
"""
|
| 6 |
+
|
| 7 |
+
import os
|
| 8 |
+
import shutil
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
import sys
|
| 11 |
+
|
| 12 |
+
def move_files_to_root(repo_path="."):
|
| 13 |
+
"""
|
| 14 |
+
Moves all files from the 'econ' subdirectory to the repository root.
|
| 15 |
+
|
| 16 |
+
Args:
|
| 17 |
+
repo_path (str): Path to the local clone of the repository.
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
# Define paths
|
| 21 |
+
repo_dir = Path(repo_path).resolve()
|
| 22 |
+
econ_dir = repo_dir / "econ"
|
| 23 |
+
root_dir = repo_dir
|
| 24 |
+
|
| 25 |
+
print(f"Repository root: {root_dir}")
|
| 26 |
+
print(f"Econ subdirectory: {econ_dir}")
|
| 27 |
+
|
| 28 |
+
# Check if 'econ' directory exists
|
| 29 |
+
if not econ_dir.exists() or not econ_dir.is_dir():
|
| 30 |
+
print(f"❌ Error: 'econ' subdirectory not found at {econ_dir}")
|
| 31 |
+
print("Please ensure you are in the correct directory and the 'econ' folder exists.")
|
| 32 |
+
return False
|
| 33 |
+
|
| 34 |
+
# List files in the 'econ' directory
|
| 35 |
+
files_to_move = list(econ_dir.iterdir())
|
| 36 |
+
|
| 37 |
+
if not files_to_move:
|
| 38 |
+
print("ℹ️ No files found in the 'econ' directory.")
|
| 39 |
+
return True
|
| 40 |
+
|
| 41 |
+
print(f"📁 Found {len(files_to_move)} files/directories in 'econ':")
|
| 42 |
+
for item in files_to_move:
|
| 43 |
+
print(f" - {item.name}")
|
| 44 |
+
|
| 45 |
+
# Move files
|
| 46 |
+
moved_count = 0
|
| 47 |
+
for item in files_to_move:
|
| 48 |
+
source_path = item
|
| 49 |
+
dest_path = root_dir / item.name
|
| 50 |
+
|
| 51 |
+
# Check if a file with the same name already exists in root
|
| 52 |
+
if dest_path.exists():
|
| 53 |
+
print(f"⚠️ Warning: {item.name} already exists in root. Skipping...")
|
| 54 |
+
continue
|
| 55 |
+
|
| 56 |
+
try:
|
| 57 |
+
# Move the file/directory
|
| 58 |
+
shutil.move(str(source_path), str(dest_path))
|
| 59 |
+
moved_count += 1
|
| 60 |
+
print(f"✅ Moved: {item.name}")
|
| 61 |
+
except Exception as e:
|
| 62 |
+
print(f"❌ Failed to move {item.name}: {e}")
|
| 63 |
+
|
| 64 |
+
# Check if 'econ' directory is now empty and remove it
|
| 65 |
+
try:
|
| 66 |
+
if not any(econ_dir.iterdir()):
|
| 67 |
+
econ_dir.rmdir()
|
| 68 |
+
print(f"🗑️ Removed empty 'econ' directory")
|
| 69 |
+
except Exception as e:
|
| 70 |
+
print(f"⚠️ Could not remove 'econ' directory: {e}")
|
| 71 |
+
|
| 72 |
+
print(f"\n🎉 Successfully moved {moved_count} out of {len(files_to_move)} items to the root directory.")
|
| 73 |
+
|
| 74 |
+
if moved_count < len(files_to_move):
|
| 75 |
+
print("💡 Some files may not have been moved due to conflicts. Please review manually.")
|
| 76 |
+
|
| 77 |
+
return True
|
| 78 |
+
|
| 79 |
+
def update_config_json(repo_path="."):
|
| 80 |
+
"""
|
| 81 |
+
Updates the config.json file if it references the old 'econ' path.
|
| 82 |
+
"""
|
| 83 |
+
|
| 84 |
+
config_path = Path(repo_path) / "config.json"
|
| 85 |
+
|
| 86 |
+
if config_path.exists():
|
| 87 |
+
try:
|
| 88 |
+
import json
|
| 89 |
+
with open(config_path, 'r', encoding='utf-8') as f:
|
| 90 |
+
config = json.load(f)
|
| 91 |
+
|
| 92 |
+
# Check if config needs updating
|
| 93 |
+
needs_update = False
|
| 94 |
+
# You can add specific checks here based on your config structure
|
| 95 |
+
|
| 96 |
+
if needs_update:
|
| 97 |
+
with open(config_path, 'w', encoding='utf-8') as f:
|
| 98 |
+
json.dump(config, f, indent=2)
|
| 99 |
+
print("✅ Updated config.json")
|
| 100 |
+
else:
|
| 101 |
+
print("ℹ️ config.json doesn't appear to need updates")
|
| 102 |
+
|
| 103 |
+
except Exception as e:
|
| 104 |
+
print(f"⚠️ Could not check/update config.json: {e}")
|
| 105 |
+
|
| 106 |
+
def main():
|
| 107 |
+
"""Main function to orchestrate the file movement."""
|
| 108 |
+
|
| 109 |
+
print("=" * 60)
|
| 110 |
+
print("AEGISCONDUCT MODEL FILES REORGANIZATION")
|
| 111 |
+
print("=" * 60)
|
| 112 |
+
print("This script moves files from 'econ' subdirectory to repository root.")
|
| 113 |
+
print(f"Repository: Gaston895/aegisconduct")
|
| 114 |
+
print("=" * 60)
|
| 115 |
+
|
| 116 |
+
# Ask for confirmation
|
| 117 |
+
response = input("\n⚠️ WARNING: This will modify your local repository structure.\nDo you want to continue? (yes/no): ").strip().lower()
|
| 118 |
+
|
| 119 |
+
if response not in ['yes', 'y']:
|
| 120 |
+
print("Operation cancelled.")
|
| 121 |
+
return
|
| 122 |
+
|
| 123 |
+
# Step 1: Move files
|
| 124 |
+
print("\n" + "=" * 60)
|
| 125 |
+
print("STEP 1: Moving files from 'econ' to root directory")
|
| 126 |
+
print("=" * 60)
|
| 127 |
+
|
| 128 |
+
success = move_files_to_root()
|
| 129 |
+
|
| 130 |
+
if not success:
|
| 131 |
+
print("❌ File movement failed. Exiting.")
|
| 132 |
+
return
|
| 133 |
+
|
| 134 |
+
# Step 2: Update config if needed
|
| 135 |
+
print("\n" + "=" * 60)
|
| 136 |
+
print("STEP 2: Checking configuration files")
|
| 137 |
+
print("=" * 60)
|
| 138 |
+
|
| 139 |
+
update_config_json()
|
| 140 |
+
|
| 141 |
+
# Step 3: Instructions for next steps
|
| 142 |
+
print("\n" + "=" * 60)
|
| 143 |
+
print("NEXT STEPS")
|
| 144 |
+
print("=" * 60)
|
| 145 |
+
print("1. Review the moved files in your repository root")
|
| 146 |
+
print("2. Update your application code to load from root (not 'econ' subfolder)")
|
| 147 |
+
print("3. Test that the model loads correctly:")
|
| 148 |
+
print(" - From Python: model = AutoModelForCausalLM.from_pretrained('Gaston895/aegisconduct')")
|
| 149 |
+
print(" - No 'subfolder' or 'revision' parameter needed")
|
| 150 |
+
print("4. Commit and push changes to Hugging Face Hub:")
|
| 151 |
+
print(" git add .")
|
| 152 |
+
print(" git commit -m 'Move model files from econ subdir to root'")
|
| 153 |
+
print(" git push origin main")
|
| 154 |
+
print("=" * 60)
|
| 155 |
+
|
| 156 |
+
print("\n✅ Script completed successfully!")
|
| 157 |
+
|
| 158 |
+
if __name__ == "__main__":
|
| 159 |
+
main()
|