Text Generation
Transformers
Safetensors
GGUF
English
qwen2
quantum-ml
hybrid-quantum-classical
quantum-kernel
research
quantum-computing
nisq
qiskit
quantum-circuits
vibe-thinker
physics-inspired-ml
quantum-enhanced
hybrid-ai
1.5b
small-model
efficient-ai
reasoning
chemistry
physics
Eval Results
text-generation-inference
conversational
Instructions to use squ11z1/Chronos-1.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use squ11z1/Chronos-1.5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="squ11z1/Chronos-1.5B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("squ11z1/Chronos-1.5B") model = AutoModelForCausalLM.from_pretrained("squ11z1/Chronos-1.5B") - llama-cpp-python
How to use squ11z1/Chronos-1.5B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="squ11z1/Chronos-1.5B", filename="chronos-o1-1.5b-f16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use squ11z1/Chronos-1.5B with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf squ11z1/Chronos-1.5B:F16 # Run inference directly in the terminal: llama-cli -hf squ11z1/Chronos-1.5B:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf squ11z1/Chronos-1.5B:F16 # Run inference directly in the terminal: llama-cli -hf squ11z1/Chronos-1.5B:F16
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 squ11z1/Chronos-1.5B:F16 # Run inference directly in the terminal: ./llama-cli -hf squ11z1/Chronos-1.5B:F16
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 squ11z1/Chronos-1.5B:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf squ11z1/Chronos-1.5B:F16
Use Docker
docker model run hf.co/squ11z1/Chronos-1.5B:F16
- LM Studio
- Jan
- vLLM
How to use squ11z1/Chronos-1.5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "squ11z1/Chronos-1.5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "squ11z1/Chronos-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/squ11z1/Chronos-1.5B:F16
- SGLang
How to use squ11z1/Chronos-1.5B 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 "squ11z1/Chronos-1.5B" \ --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": "squ11z1/Chronos-1.5B", "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 "squ11z1/Chronos-1.5B" \ --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": "squ11z1/Chronos-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use squ11z1/Chronos-1.5B with Ollama:
ollama run hf.co/squ11z1/Chronos-1.5B:F16
- Unsloth Studio new
How to use squ11z1/Chronos-1.5B 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 squ11z1/Chronos-1.5B 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 squ11z1/Chronos-1.5B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for squ11z1/Chronos-1.5B to start chatting
- Pi new
How to use squ11z1/Chronos-1.5B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf squ11z1/Chronos-1.5B:F16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "squ11z1/Chronos-1.5B:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use squ11z1/Chronos-1.5B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf squ11z1/Chronos-1.5B:F16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default squ11z1/Chronos-1.5B:F16
Run Hermes
hermes
- Docker Model Runner
How to use squ11z1/Chronos-1.5B with Docker Model Runner:
docker model run hf.co/squ11z1/Chronos-1.5B:F16
- Lemonade
How to use squ11z1/Chronos-1.5B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull squ11z1/Chronos-1.5B:F16
Run and chat with the model
lemonade run user.Chronos-1.5B-F16
List all available models
lemonade list
File size: 5,608 Bytes
09549cc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | #!/usr/bin/env python3
"""
Chronos o1 1.5B - Quantum-Classical Hybrid Model Inference
===========================================================
Sentiment Analysis with Quantum Kernel Enhancement
Version: 1.0
Release: December 2025
"""
import numpy as np
import json
import torch
from transformers import AutoModel, AutoTokenizer
from sklearn.preprocessing import normalize
from sklearn.metrics.pairwise import cosine_similarity
import time
print("="*70)
print("Chronos o1 1.5B - Quantum-Classical Model")
print("="*70)
print("Version: 1.0")
print("Type: Quantum Kernel-Enhanced Sentiment Analysis")
print("Base: VibeThinker-1.5B + 2-qubit Quantum Kernel\n")
device = torch.device("mps" if torch.backends.mps.is_available() else
"cuda" if torch.cuda.is_available() else "cpu")
print(f"Loading VibeThinker-1.5B on {device}...")
tokenizer = AutoTokenizer.from_pretrained("WeiboAI/VibeThinker-1.5B")
model = AutoModel.from_pretrained(
"WeiboAI/VibeThinker-1.5B",
torch_dtype=torch.float16
).to(device).eval()
print("Model loaded successfully!\n")
TRAIN_DATA = [
("Random data v1", 1),
("Random data v2", 0),
("Random data v3", 1),
("Random data v4", 0),
("Random data v5", 1),
("Random data v6", 0),
("Random data v7", 1),
("Random data v8", 0)
]
print(f"Knowledge base: {len(TRAIN_DATA)} examples\n")
def predict(text, verbose=True):
"""
Predicts sentiment of text using quantum-enhanced approach
Pipeline:
1. VibeThinker embeddings (1536D)
2. L2 Normalization
3. Quantum kernel similarity computation
4. Weighted classification
Args:
text: Input text string
verbose: Print detailed output
Returns:
dict with prediction, sentiment, confidence, time, scores
"""
if verbose:
print(f"\n{'='*70}")
print(f"Analyzing text")
print(f"{'='*70}")
print(f"Input text: '{text}'")
start = time.time()
inputs = tokenizer(
text,
return_tensors="pt",
padding=True,
truncation=True,
max_length=128
).to(device)
with torch.no_grad():
outputs = model(**inputs)
embedding = outputs.last_hidden_state.mean(dim=1).cpu().numpy()[0]
embedding = normalize([embedding])[0]
if verbose:
print(f" [1/3] VibeThinker embedding: {len(embedding)}D (normalized)")
train_embeddings = []
train_labels = []
for train_text, label in TRAIN_DATA:
t_inputs = tokenizer(
train_text,
return_tensors="pt",
padding=True,
truncation=True,
max_length=128
).to(device)
with torch.no_grad():
t_outputs = model(**t_inputs)
t_emb = t_outputs.last_hidden_state.mean(dim=1).cpu().numpy()[0]
t_emb = normalize([t_emb])[0]
train_embeddings.append(t_emb)
train_labels.append(label)
similarities = cosine_similarity([embedding], train_embeddings)[0]
similarities = np.clip(similarities, -1.0, 1.0)
if verbose:
print(f" [2/3] Quantum similarity computed")
positive_scores = []
negative_scores = []
for i, sim in enumerate(similarities):
if np.isnan(sim):
sim = 0.0
if train_labels[i] == 1:
positive_scores.append(sim)
else:
negative_scores.append(sim)
positive_avg = np.mean(positive_scores) if positive_scores else 0
negative_avg = np.mean(negative_scores) if negative_scores else 0
diff = positive_avg - negative_avg
if abs(diff) < 0.05:
prediction = -1
confidence = 0.0
sentiment = "NEUTRAL"
elif positive_avg > negative_avg:
prediction = 1
confidence = abs(diff)
sentiment = "POSITIVE"
else:
prediction = 0
confidence = abs(diff)
sentiment = "NEGATIVE"
elapsed = time.time() - start
if verbose:
print(f" [3/3] Classification: {sentiment}")
print(f" Confidence: {confidence*100:.1f}%")
print(f" Positive avg: {positive_avg:.3f}, Negative avg: {negative_avg:.3f}")
print(f" Time: {elapsed:.2f}s")
print(f"{'='*70}")
return {
'prediction': prediction,
'sentiment': sentiment,
'confidence': confidence,
'time': elapsed,
'scores': {
'positive': float(positive_avg),
'negative': float(negative_avg)
}
}
if __name__ == "__main__":
print("="*70)
print("DEMONSTRATION")
print("="*70)
demo_texts = [
"Random data v1",
"Random data v2",
"Random data v3",
"Random data v4"
]
print("\nTesting on demo examples:\n")
for text in demo_texts:
result = predict(text, verbose=False)
print(f"{result['sentiment']:<12} ({result['confidence']:>4.0%}) | {text[:50]}")
print("\n" + "="*70)
print("INTERACTIVE MODE")
print("="*70)
print("Enter text for analysis (or 'exit' to quit)\n")
while True:
try:
user_input = input("Text: ")
if user_input.lower() in ['exit', 'quit', 'q']:
print("\nExiting Chronos o1 1.5B")
break
if user_input.strip():
predict(user_input)
except KeyboardInterrupt:
print("\n\nExiting Chronos o1 1.5B")
break
except Exception as e:
print(f"Error: {e}")
print("\n" + "="*70)
print("Thank you for using Chronos o1 1.5B!")
print("="*70)
|