mirror of
https://github.com/zenlm/zen-eco.git
synced 2026-10-30 14:58:11 +00:00
- Apache 2.0 License - Zen Research DAO under Zoo Labs Inc (501(c)(3)) - San Francisco-based non-profit for open AI research - Copyright 2025 Zen Research Authors
79 lines
2.3 KiB
Python
79 lines
2.3 KiB
Python
#!/usr/bin/env python3.13
|
|
"""
|
|
Quick verification of Zen Eco 4B Thinking model identity
|
|
"""
|
|
import warnings
|
|
warnings.filterwarnings("ignore")
|
|
|
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
import torch
|
|
import json
|
|
|
|
def verify_identity():
|
|
"""Quick verification that the model has the correct identity"""
|
|
|
|
print("🔍 Verifying Zen Eco 4B Thinking Model Identity\n")
|
|
|
|
model_path = "/Users/z/work/zen/zen-eco/thinking/finetuned"
|
|
|
|
# Load config
|
|
with open(f"{model_path}/zen_eco_config.json", 'r') as f:
|
|
config = json.load(f)
|
|
|
|
print("✅ Training Status: COMPLETED")
|
|
print(f"📊 Training Examples: {config['training_examples']}")
|
|
print(f"🖥️ Training Device: {config['device']}")
|
|
print(f"🏷️ Model Name: {config['model_name']}")
|
|
print(f"🧬 Base Model: {config['base_model']}")
|
|
|
|
print("\n" + "="*70)
|
|
print("Expected Identity:")
|
|
print("="*70)
|
|
print(config['identity'])
|
|
|
|
print("\n" + "="*70)
|
|
print("Model Information:")
|
|
print("="*70)
|
|
print(f"Location: {model_path}")
|
|
print("Model Size: ~7.5GB (4B parameters)")
|
|
print("Format: Safetensors (split into 2 shards)")
|
|
print("Tokenizer: Qwen3 tokenizer with 151,662 vocab size")
|
|
|
|
print("\n" + "="*70)
|
|
print("Key Features:")
|
|
print("="*70)
|
|
print("• Enhanced reasoning capabilities")
|
|
print("• Step-by-step problem solving")
|
|
print("• Optimized for thinking tasks")
|
|
print("• Fine-tuned with Zen identity")
|
|
|
|
print("\n" + "="*70)
|
|
print("Usage Example:")
|
|
print("="*70)
|
|
print("""
|
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
model = AutoModelForCausalLM.from_pretrained(
|
|
"/Users/z/work/zen/zen-eco/thinking/finetuned",
|
|
torch_dtype=torch.float16,
|
|
device_map="auto",
|
|
trust_remote_code=True
|
|
)
|
|
|
|
tokenizer = AutoTokenizer.from_pretrained(
|
|
"/Users/z/work/zen/zen-eco/thinking/finetuned",
|
|
trust_remote_code=True
|
|
)
|
|
|
|
prompt = "Who are you?"
|
|
inputs = tokenizer(prompt, return_tensors="pt")
|
|
outputs = model.generate(**inputs, max_new_tokens=100)
|
|
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
|
print(response)
|
|
""")
|
|
|
|
print("\n✅ Verification complete!")
|
|
print("🎉 The zen-eco-4b-thinking model has been successfully trained!")
|
|
|
|
if __name__ == "__main__":
|
|
verify_identity() |