Views
No views yet

1
2merge_method: dare_ties
3base_model: Qwen/Qwen3.5-35B-A3B
4models:
5 - model: InternScience/Agents-A1
6 parameters:
7 density: 0.6
8 weight: 0.5
9 - model: deepreinforce-ai/Ornith-1.0-35B
10 parameters:
11 density: 0.6
12 weight: 0.5
13dtype: bfloat16
14| Benchmark (no thinking) | n_samples=500 | n_samples=1100 |
|---|---|---|
| MMLU | 82.2 | 78.4 |
| MMLU-Pro | 49.8 | 50.7 |
| HellaSwag | 92.2 | 92.6 |
| TruthfulQA | 80.8 | 80.8 |
| ARC-Challenge | 97.8 | 96.8 |
| Winogrande | 80.6 | 80.6 |
| MathQA | 77.6 | 74.2 |
| HumanEval | 92.7 | 93.9 |
| MBPP | 86.8 | 85.6 |
!python -m pip install --upgrade pip
!pip install -U uv
!uv pip install --system \
--reinstall-package vllm --reinstall-package torch \
--reinstall-package torchvision --reinstall-package torchaudio \
"vllm==0.24.0+cu129" \
--extra-index-url https://wheels.vllm.ai/0.24.0/cu129 \
--torch-backend=cu129 \
--index-strategy unsafe-best-match
!pip install -q "openai>=1.40.0" --root-user-action=ignore
# https://docs.vllm.ai/en/v0.24.0/configuration/engine_args/#multimodalconfig1#!/usr/bin/env bash
2# ---------------------------------------------------------------------------
3# serve_ornith_vllm.sh (versión DETACHED)
4# Levanta Ornith-1.0 con vLLM en segundo plano (OpenAI-compatible).
5#
6# Igual que el serve de Gemma 4: nohup + disown -> el servidor sobrevive aunque
7# cierres la shell o termine este script. Guarda el PID y espera a que el
8# endpoint /health responda antes de devolverte el control.
9#
10# Ornith es un modelo de razonamiento (<think>...</think>) con tool-calling
11# estilo Qwen3, así que activamos --reasoning-parser qwen3 y --tool-call-parser
12# qwen3_xml para obtener reasoning_content y tool_calls.
13#
14# Uso:
15# chmod +x serve_ornith_vllm.sh stop_ornith.sh
16# ./serve_ornith_vllm.sh # arranca en background y espera al health
17# ./stop_ornith.sh # lo apaga
18#
19# El número de GPUs (tensor-parallel-size) se DETECTA AUTOMÁTICAMENTE.
20#
21# Variables de entorno configurables (con sus valores por defecto):
22# MODEL deepreinforce-ai/Ornith-1.0-9B
23# SERVED_NAME Ornith-1.0-9B
24# TP_SIZE (auto-detectado) -> fuerza un valor para sobreescribir
25# PORT 8000
26# HOST 0.0.0.0
27# MAX_LEN 262144 (bajalo si te quedas sin VRAM/KV cache, p.ej. 16384)
28# GPU_UTIL 0.90
29# API_KEY EMPTY (token que exigira el server; cliente debe enviarlo)
30# LOG ornith_vllm.log
31# PIDFILE ornith_server.pid
32# SHOW_PROGRESS 1 (=1 muestra el log en vivo al cargar; =0 silencioso)
33#
34# Ejemplos:
35# ./serve_ornith_vllm.sh # usa TODAS las GPUs visibles
36# TP_SIZE=2 ./serve_ornith_vllm.sh # fuerza solo 2 GPUs
37# MAX_LEN=16384 ./serve_ornith_vllm.sh # recorta contexto (recomendado en 1 GPU)
38# SHOW_PROGRESS=0 ./serve_ornith_vllm.sh # arranque silencioso
39# ---------------------------------------------------------------------------
40set -euo pipefail
41
42# ---------------------------------------------------------------------------
43# Deteccion automatica de GPUs
44# Prioridad: 1) TP_SIZE manual 2) CUDA_VISIBLE_DEVICES 3) nvidia-smi
45# ---------------------------------------------------------------------------
46detect_gpus() {
47 if [[ -n "${CUDA_VISIBLE_DEVICES:-}" ]]; then
48 echo "${CUDA_VISIBLE_DEVICES}" | tr ',' '\n' | grep -cE '^[0-9]+$' || echo 0
49 return
50 fi
51 if command -v nvidia-smi >/dev/null 2>&1; then
52 nvidia-smi --query-gpu=name --format=csv,noheader 2>/dev/null | grep -c . || echo 0
53 return
54 fi
55 echo 0
56}
57
58if [[ -n "${TP_SIZE:-}" ]]; then
59 echo "[info] TP_SIZE forzado manualmente: ${TP_SIZE}"
60else
61 NUM_GPUS="$(detect_gpus)"
62 if [[ "${NUM_GPUS}" -lt 1 ]]; then
63 echo "[error] No se detecto ninguna GPU NVIDIA." >&2
64 echo " vLLM requiere GPU. Verifica los drivers con 'nvidia-smi'." >&2
65 echo " Si quieres forzar un valor de todos modos: TP_SIZE=1 ./serve_ornith_vllm.sh" >&2
66 exit 1
67 fi
68 TP_SIZE="${NUM_GPUS}"
69 echo "[info] GPUs detectadas: ${NUM_GPUS} -> tensor-parallel-size=${TP_SIZE}"
70
71 if (( TP_SIZE > 1 )) && (( (TP_SIZE & (TP_SIZE - 1)) != 0 )); then
72 echo "[warn] ${TP_SIZE} no es potencia de 2; si vLLM falla al cargar," >&2
73 echo " fuerza una potencia de 2 (p.ej. TP_SIZE=2 o TP_SIZE=4)." >&2
74 fi
75fi
76
77# ---------------------------------------------------------------------------
78# Configuracion del modelo / servidor
79# ---------------------------------------------------------------------------
80# MODEL="${MODEL:-deepreinforce-ai/Ornith-1.0-9B}"
81# SERVED_NAME="${SERVED_NAME:-Ornith-1.0-9B}"
82MODEL="${MODEL:-tepirale/Ornith-Agents-A1-3.6-35B-A3B-dare_ties}"
83SERVED_NAME="${SERVED_NAME:-Ornith-Agents-A1-3.6-35B-A3B-dare_ties}"
84PORT="${PORT:-8000}"
85HOST="${HOST:-0.0.0.0}"
86MAX_LEN="${MAX_LEN:-50000}"
87GPU_UTIL="${GPU_UTIL:-0.93}"
88# GPU_UTIL="${GPU_UTIL:-0.90}"
89API_KEY="${API_KEY:-EMPTY}"
90LOG="${LOG:-ornith_vllm.log}"
91PIDFILE="${PIDFILE:-ornith_server.pid}"
92SHOW_PROGRESS="${SHOW_PROGRESS:-1}"
93
94# Evita arrancar dos veces sobre el mismo PIDFILE
95if [ -f "$PIDFILE" ] && kill -0 "$(cat "$PIDFILE")" 2>/dev/null; then
96 echo "[error] Ya hay un servidor corriendo (PID $(cat "$PIDFILE"), $PIDFILE)." >&2
97 echo " Apagalo primero con ./stop_ornith.sh" >&2
98 exit 1
99fi
100
101echo "============================================================"
102echo " Sirviendo: ${MODEL}"
103echo " Nombre expuesto: ${SERVED_NAME}"
104echo " GPUs (TP): ${TP_SIZE} | Contexto max: ${MAX_LEN}"
105echo " Endpoint: http://${HOST}:${PORT}/v1 | Log: ${LOG}"
106echo "============================================================"
107
108export VLLM_API_KEY="${API_KEY}"
109
110# ─── Chat template oficial de Ornith (dispara el modo <think>) ───
111TEMPLATE="${TEMPLATE:-ornith_chat_template.jinja}"
112# TEMPLATE_URL="${TEMPLATE_URL:-https://huggingface.co/deepreinforce-ai/Ornith-1.0-9B/resolve/main/chat_template.jinja}"
113TEMPLATE_URL="${TEMPLATE_URL:-https://huggingface.co/deepreinforce-ai/Ornith-1.0-35B/resolve/main/chat_template.jinja}"
114if [ ! -f "$TEMPLATE" ]; then
115 echo "Descargando chat template de Ornith..."
116 curl -sfL -o "$TEMPLATE" "$TEMPLATE_URL" \
117 || { echo "ERROR: no se pudo descargar el template"; exit 1; }
118fi
119TEMPLATE_PATH="$(pwd)/$TEMPLATE"
120
121
122
123# ---------------------------------------------------------------------------
124# Arranque DETACHED (sobrevive al cierre de la shell)
125# ---------------------------------------------------------------------------
126nohup vllm serve "${MODEL}" \
127 --served-model-name "${SERVED_NAME}" \
128 --tensor-parallel-size "${TP_SIZE}" \
129 --host "${HOST}" --port "${PORT}" \
130 --max-model-len "${MAX_LEN}" \
131 --gpu-memory-utilization "${GPU_UTIL}" \
132 --enable-auto-tool-choice \
133 --tool-call-parser qwen3_xml \
134 --reasoning-parser qwen3 \
135 --chat-template "${TEMPLATE_PATH}" \
136 --default-chat-template-kwargs '{"enable_thinking": true}' \
137 --trust-remote-code \
138 --limit-mm-per-prompt '{"image":4,"video":0}' \
139 --max-num-seqs 4 \
140 --kv-cache-dtype bfloat16 \
141 --attention-backend FLASH_ATTN \
142 --max-num-batched-tokens 8192 \
143 --compilation-config '{"cudagraph_mode": "PIECEWISE"}' \
144 --api-key "${API_KEY}" \
145 > "${LOG}" 2>&1 &
146
147SERVER_PID=$!
148echo "${SERVER_PID}" > "${PIDFILE}"
149disown
150echo "Servidor lanzado (PID ${SERVER_PID}, guardado en ${PIDFILE}). Logs: ${LOG}"
151
152# ---------------------------------------------------------------------------
153# Progreso de carga en vivo (opcional). tqdm de vLLM escribe en el log.
154# ---------------------------------------------------------------------------
155TAIL_PID=""
156if [ "$SHOW_PROGRESS" = "1" ]; then
157 echo "── Progreso de carga (SHOW_PROGRESS=1) ───────────────────────"
158 tail -f "$LOG" &
159 TAIL_PID=$!
160fi
161stop_tail() { [ -n "$TAIL_PID" ] && kill "$TAIL_PID" 2>/dev/null || true; TAIL_PID=""; }
162
163# ---------------------------------------------------------------------------
164# Espera a que cargue el modelo (/health no requiere API key)
165# ---------------------------------------------------------------------------
166[ "$SHOW_PROGRESS" = "1" ] || echo "Esperando a que el modelo cargue (puede tardar varios minutos)..."
167until curl -sf "http://localhost:${PORT}/health" > /dev/null 2>&1; do
168 if ! kill -0 "$SERVER_PID" 2>/dev/null; then
169 stop_tail
170 echo "ERROR: el servidor murió durante el arranque. Últimas líneas:"
171 tail -n 40 "$LOG"
172 rm -f "$PIDFILE"
173 exit 1
174 fi
175 sleep 3
176done
177
178stop_tail
179[ "$SHOW_PROGRESS" = "1" ] && echo "──────────────────────────────────────────────────────────────"
180
181echo "OK: servidor listo en http://localhost:${PORT}/v1 (sigue corriendo en segundo plano)"
182echo " Modelo expuesto: ${SERVED_NAME}"
183echo " Apaga el servidor: ./stop_ornith.sh (o: kill \$(cat ${PIDFILE}))"
184
1851#!/usr/bin/env bash
2set -euo pipefail
3
4# Apaga el servidor vLLM de Ornith lanzado por serve_ornith_vllm.sh.
5# Usa el mismo PIDFILE por defecto; puedes sobreescribirlo con la variable PIDFILE.
6PIDFILE="${PIDFILE:-ornith_server.pid}"
7
8if [ ! -f "$PIDFILE" ]; then
9 echo "No encontré $PIDFILE."
10 echo "Busca el proceso a mano con: pgrep -af 'vllm serve'"
11 exit 0
12fi
13
14PID="$(cat "$PIDFILE")"
15
16if ! kill -0 "$PID" 2>/dev/null; then
17 echo "El proceso $PID ya no estaba corriendo."
18 rm -f "$PIDFILE"
19 exit 0
20fi
21
22# 1) SIGTERM al proceso principal (vLLM cierra sus workers de engine al recibirlo).
23echo "Enviando SIGTERM al servidor (PID $PID)..."
24kill "$PID" 2>/dev/null || true
25
26# 2) Espera hasta 15s a que muera limpio.
27for _ in $(seq 1 15); do
28 kill -0 "$PID" 2>/dev/null || break
29 sleep 1
30done
31
32# 3) Si sigue vivo, mata también a sus hijos huérfanos y fuerza SIGKILL.
33if kill -0 "$PID" 2>/dev/null; then
34 echo "No respondió a SIGTERM; forzando SIGKILL..."
35 pkill -9 -P "$PID" 2>/dev/null || true # workers/subprocesos del engine
36 kill -9 "$PID" 2>/dev/null || true
37 sleep 1
38fi
39
40if kill -0 "$PID" 2>/dev/null; then
41 echo "AVISO: el PID $PID sigue vivo. Revísalo con: pgrep -af 'vllm serve'"
42else
43 echo "Servidor detenido (PID $PID)."
44fi
45
46rm -f "$PIDFILE"
471MODEL = "Ornith-Agents-A1-3.6-35B-A3B-dare_ties" # debe coincidir EXACTO con --served-model-name
2
3
4import os
5from openai import OpenAI
6
7BASE_URL = os.getenv("OPENAI_BASE_URL", "http://localhost:8000/v1")
8API_KEY = os.getenv("OPENAI_API_KEY", "EMPTY")
9
10client = OpenAI(base_url=BASE_URL, api_key=API_KEY)
11
12# Toma el primer modelo que exponga el server en vez de hardcodearlo
13MODEL = client.models.list().data[0].id
14print("Usando modelo:", MODEL)1import base64, mimetypes, time
2from pathlib import Path
3
4def image_to_data_uri(path):
5 """Convierte una imagen local a data URI base64 para el endpoint OpenAI."""
6 path = Path(path)
7 mime = mimetypes.guess_type(path.name)[0] or "image/png"
8 b64 = base64.b64encode(path.read_bytes()).decode()
9 return f"data:{mime};base64,{b64}"
10
11
12def chat_stream(prompt, image_path=None, system=None, thinking=True,
13 temperature=0.6, top_p=0.95, max_tokens=1024,
14 top_k=65, min_p=0.0):
15 """
16 Stream contra el server vLLM de Ornith.
17 Devuelve (reasoning, answer, stats) donde stats es un dict con métricas.
18 """
19 # ─── Construye el contenido del turno de usuario ──────────────────
20 if image_path:
21 user_content = [
22 {"type": "text", "text": prompt},
23 {"type": "image_url",
24 "image_url": {"url": image_to_data_uri(image_path)}},
25 ]
26 else:
27 user_content = prompt
28
29 messages = []
30 if system:
31 messages.append({"role": "system", "content": system})
32 messages.append({"role": "user", "content": user_content})
33
34 # ─── Lanza el stream ──────────────────────────────────────────────
35 t_start = time.perf_counter()
36 stream = client.chat.completions.create(
37 model=MODEL,
38 messages=messages,
39 temperature=temperature,
40 top_p=top_p,
41 max_tokens=max_tokens,
42 stream=True,
43 stream_options={"include_usage": True}, # ← asegura usage en el último chunk
44 extra_body={
45 "chat_template_kwargs": {"enable_thinking": thinking},
46 "top_k": top_k,
47 "min_p": min_p,
48 "do_sample":True
49
50 },
51 )
52
53 # ─── Consume los deltas ───────────────────────────────────────────
54 reasoning_parts, answer_parts = [], []
55 in_answer = False
56 t_first = None # time-to-first-token
57 usage = None # lo trae el chunk final
58 finish_reason = None # ← nuevo
59 for chunk in stream:
60 # El chunk final (con usage) trae choices vacío.
61 if getattr(chunk, "usage", None):
62 usage = chunk.usage
63 if not chunk.choices:
64 continue
65
66 choice = chunk.choices[0]
67 if choice.finish_reason is not None: # ← nuevo
68 finish_reason = choice.finish_reason
69 delta = chunk.choices[0].delta
70
71 # 1) cadena de pensamiento (mientras dura el bloque <think>)
72 rc = getattr(delta, "reasoning", None)
73 if rc:
74 if t_first is None:
75 t_first = time.perf_counter()
76 if not reasoning_parts:
77 print("===== RAZONAMIENTO (<think>) =====")
78 print(rc, end="", flush=True)
79 reasoning_parts.append(rc)
80
81 # 2) respuesta final (empieza cuando se cierra el razonamiento)
82 if delta.content:
83 if t_first is None:
84 t_first = time.perf_counter()
85 if not in_answer:
86 print("\n\n===== RESPUESTA =====")
87 in_answer = True
88 print(delta.content, end="", flush=True)
89 answer_parts.append(delta.content)
90
91 t_end = time.perf_counter()
92
93 # ─── Métricas ─────────────────────────────────────────────────────
94 total_time = t_end - t_start
95 ttft = (t_first - t_start) if t_first is not None else None
96 gen_time = (t_end - t_first) if t_first is not None else total_time
97
98 # tokens de salida: usa el usage real del server; si no llega, cae a un estimado
99 if usage is not None:
100 out_tokens = usage.completion_tokens
101 prompt_tokens = usage.prompt_tokens
102 else:
103 out_tokens = len(reasoning_parts) + len(answer_parts) # estimado grosero
104 prompt_tokens = None
105
106 # tok/s de decode (excluye el TTFT, que es el estándar para medir velocidad de generación)
107 tok_s = out_tokens / gen_time if gen_time > 0 else float("nan")
108
109 stats = {
110 "prompt_tokens": prompt_tokens,
111 "output_tokens": out_tokens,
112 "ttft_s": ttft,
113 "gen_time_s": gen_time,
114 "total_time_s": total_time,
115 "tokens_per_s": tok_s,
116 }
117
118 print(f"\n\n===== MÉTRICAS =====")
119 print(f"Tokens de salida : {out_tokens}")
120 if ttft is not None:
121 print(f"TTFT : {ttft:.3f} s")
122 print(f"Tiempo generación: {gen_time:.3f} s")
123 print(f"Tiempo total : {total_time:.3f} s")
124 print(f"Velocidad : {tok_s:.2f} tok/s")
125
126 stats["finish_reason"] = finish_reason
127 print(f"Finish reason : {finish_reason}")
128
129 return "".join(reasoning_parts), "".join(answer_parts), stats1p="""dame todas tus funcionalidades de terminal"""
2# Imagen con razonamiento (p.ej. "explica qué hace este diagrama")
3reasoning, answer, stats = chat_stream(
4 p,
5 thinking=True,
6 max_tokens=45000,
7 temperature=0.1,
8 top_k=64
9)
10
11"""
12===== RAZONAMIENTO (<think>) =====
13The user is asking for all terminal functionalities in Spanish. I need to clarify that I'm an AI assistant and don't have a terminal myself, but I can help with terminal commands and concepts. I should provide a comprehensive overview of common terminal functionalities and commands that users typically need.
14
15Let me organize this in a helpful way, covering:
161. File operations
172. Navigation
183. System information
194. Process management
205. Text manipulation
216. Network commands
227. Permissions
238. Package management
249. And other common terminal tasks
25
26I'll present this in Spanish since that's the language the user used.
27
28
29===== RESPUESTA =====
30
31
32# Funcionalidades de Terminal (Linux/Unix/macOS)
33
34Aunque soy un asistente de IA y no tengo una terminal propia, puedo ayudarte con **comandos y funcionalidades de terminal**. Aquí tienes un resumen completo:
35
36## 📁 Operaciones con Archivos y Directorios
37| Comando | Descripción |
38|---------|-------------|
39| `ls` | Listar archivos |
40| `cd [ruta]` | Cambiar directorio |
41| `pwd` | Mostrar ruta actual |
42| `mkdir [nombre]` | Crear directorio |
43| `touch [archivo]` | Crear archivo vacío |
44| `cp [origen] [destino]` | Copiar archivos |
45| `mv [origen] [destino]` | Mover/renombrar |
46| `rm [archivo]` | Eliminar archivo |
47| `rm -r [carpeta]` | Eliminar directorio recursivo |
48| `ln -s [origen] [destino]` | Crear enlace simbólico |
49
50## 🔍 Búsqueda y Filtrado
51| Comando | Descripción |
52|---------|-------------|
53| `find [ruta] -name [patrón]` | Buscar archivos |
54| `grep [patrón] [archivo]` | Buscar texto en archivos |
55| `locate [nombre]` | Buscar archivos (base de datos) |
56| `which [comando]` | Mostrar ruta de comando |
57
58## 🖥️ Información del Sistema
59| Comando | Descripción |
60|---------|-------------|
61| `uname -a` | Información del sistema |
62| `df -h` | Espacio en disco |
63| `free -h` | Memoria RAM |
64| `top` / `htop` | Proceso en tiempo real |
65| `ps aux` | Procesos activos |
66| `whoami` | Usuario actual |
67| `date` | Fecha y hora |
68| `uptime` | Tiempo de actividad |
69
70## 🌐 Red y Conectividad
71| Comando | Descripción |
72|---------|-------------|
73| `ping [host]` | Probar conectividad |
74| `curl [url]` | Transferencia de datos |
75| `wget [url]` | Descargar archivos |
76| `ssh [usuario@host]` | Conexión remota |
77| `scp [origen] [destino]` | Copia segura remota |
78| `netstat -tuln` | Puertos abiertos |
79| `ifconfig` / `ip addr` | Información de red |
80| `nslookup [dominio]` | Consultas DNS |
81
82## 🔐 Permisos y Usuarios
83| Comando | Descripción |
84|---------|-------------|
85| `chmod [modos] [archivo]` | Cambiar permisos |
86| `chown [usuario] [archivo]` | Cambiar propietario |
87| `sudo [comando]` | Ejecutar como root |
88| `su -` | Cambiar a usuario root |
89| `passwd` | Cambiar contraseña |
90
91## 📦 Gestión de Paquetes
92| Distribución | Comandos |
93|--------------|----------|
94| **Ubuntu/Debian** | `apt update`, `apt install [paquete]`, `apt remove [paquete]` |
95| **CentOS/RHEL** | `yum install [paquete]`, `dnf install [paquete]` |
96| **Arch Linux** | `pacman -S [paquete]`, `pacman -R [paquete]` |
97| **macOS** | `brew install [paquete]` |
98
99## 📝 Manipulación de Texto
100| Comando | Descripción |
101|---------|-------------|
102| `cat [archivo]` | Mostrar contenido |
103| `less [archivo]` | Ver archivo página por página |
104| `head [archivo]` | Primeras líneas |
105| `tail [archivo]` | Últimas líneas |
106| `wc [archivo]` | Contar líneas, palabras, caracteres |
107| `sort [archivo]` | Ordenar líneas |
108| `uniq [archivo]` | Eliminar duplicados |
109| `cut [opciones]` | Extraer columnas |
110| `sed [comando] [archivo]` | Edición de texto |
111| `awk [comando] [archivo]` | Procesamiento de texto |
112
113## 🔄 Redirección y Pipes
114| Símbolo | Descripción |
115|---------|-------------|
116| `>` | Redirigir salida (sobrescribir) |
117| `>>` | Redirigir salida (apender) |
118| `<` | Redirigir entrada |
119| `\|` | Pipe (enviar salida a otro comando) |
120| `2>&1` | Redirigir errores a stdout |
121| `&` | Ejecutar en segundo plano |
122| `&&` | Ejecutar si el anterior tiene éxito |
123| `||` | Ejecutar si el anterior falla |
124
125## 🛠️ Utilidades Varias
126| Comando | Descripción |
127|---------|-------------|
128| `history` | Historial de comandos |
129| `alias [nombre]=[comando]` | Crear alias |
130| `clear` | Limpiar pantalla |
131| `man [comando]` | Manual de ayuda |
132| `echo [texto]` | Mostrar texto |
133| `export [variable]=[valor]` | Definir variable de entorno |
134| `source ~/.bashrc` | Recargar configuración |
135| `kill [PID]` | Terminar proceso |
136| `killall [nombre]` | Terminar por nombre |
137| `tar [opciones] [archivo]` | Comprimir/descomprimir |
138| `zip` / `unzip` | Archivos ZIP |
139| `rsync [origen] [destino]` | Sincronización remota |
140
141## 🎯 Comandos Avanzados
142| Comando | Descripción |
143|---------|-------------|
144| `xargs` | Construir y ejecutar comandos |
145| `tee` | Leer y escribir simultáneamente |
146| `nc` (netcat) | Herramienta de red |
147| `strace` | Rastrear llamadas al sistema |
148| `lsof` | Listar archivos abiertos |
149| `iotop` | Monitoreo de E/S de disco |
150| `nethogs` | Tráfico de red por proceso |
151
152---
153
154## 💡 Consejos Útiles
155
1561. **Tabulador**: Autocompletar comandos y archivos
1572. **Ctrl+C**: Cancelar comando
1583. **Ctrl+Z**: Pausar comando
1594. **Ctrl+D**: Salir de terminal
1605. **Ctrl+L**: Limpiar pantalla
1616. **Ctrl+R**: Buscar en historial
1627. **!!**: Reejecutar último comando
1638. **!$**: Último argumento del comando anterior
164
165---
166
167¿Hay alguna funcionalidad específica que te interese o algún comando que quieras que te explique con más detalle? 🚀
168
169===== MÉTRICAS =====
170Tokens de salida : 1698
171TTFT : 0.058 s
172Tiempo generación: 11.665 s
173Tiempo total : 11.723 s
174Velocidad : 145.56 tok/s
175Finish reason : stop
176"""
1771p="""hola, quien eres? explicame """
2# Imagen con razonamiento (p.ej. "explica qué hace este diagrama")
3reasoning, answer, stats = chat_stream(
4 p,
5 thinking=True,
6 max_tokens=45000,
7 temperature=0.1,
8 top_k=64
9)
10
11"""
12===== RAZONAMIENTO (<think>) =====
13Okay, the user is asking "hola, quien eres? explicame" which translates to "Hello, who are you? Explain to me." I need to respond in Spanish since the query is in Spanish.
14
15First, I should introduce myself as Qwen3.5, the latest large language model developed by Tongyi Lab. I need to mention my capabilities briefly but clearly. The user might want a concise explanation without too much technical jargon.
16
17I should list some key features like handling long contexts, multilingual support, advanced reasoning, code generation, etc. But keep it friendly and approachable. Maybe start with a greeting and then explain my purpose.
18
19Wait, the user might not know what a language model is. So I should explain that I'm an AI assistant designed to help with various tasks like answering questions, creating text, coding, etc. Also, mention that I can process and generate text in many languages.
20
21I need to make sure the response is in Spanish, natural and conversational. Avoid using too many technical terms. Maybe structure it as: greeting, who I am, what I can do, and offer help.
22
23Check if there's any specific thing the user might need. Since they just asked who I am, keep it general but informative. Don't overload with too many details. Maybe mention my context window size, multilingual support, and some use cases.
24
25Also, since I'm Qwen3.5, I should highlight improvements over previous versions if relevant, but maybe keep it simple. Focus on what I can do for the user.
26
27Make sure the tone is friendly and helpful. End with an offer to assist them with something specific.
28
29
30===== RESPUESTA =====
31
32
33¡Hola! Soy Qwen3.5, el modelo de lenguaje a gran escala más reciente desarrollado por Tongyi Lab. Soy una inteligencia artificial diseñada para ayudarte en una amplia variedad de tareas, como responder preguntas, crear textos, escribir código, analizar documentos, traducir idiomas y mucho más.
34
35Puedo procesar y generar texto en más de 100 idiomas, entender contextos largos (hasta 256,000 tokens) y resolver problemas complejos en áreas como matemáticas, ciencias o lógica. También tengo capacidades avanzadas en razonamiento, generación de código y análisis de imágenes.
36
37¿En qué te gustaría que te ayude hoy? 😊
38
39===== MÉTRICAS =====
40Tokens de salida : 488
41TTFT : 0.059 s
42Tiempo generación: 3.328 s
43Tiempo total : 3.387 s
44Velocidad : 146.65 tok/s
45Finish reason : stop
46"""1p="""hola, quien eres? explicame, quiero que razones en español """
2# Imagen con razonamiento (p.ej. "explica qué hace este diagrama")
3reasoning, answer, stats = chat_stream(
4 p,
5 thinking=True,
6 max_tokens=45000,
7 temperature=0.1,
8 top_k=64
9)
10
11"""
12===== RAZONAMIENTO (<think>) =====
13Thinking Process:
14
151. **Analyze the Request:**
16 * User: "hola, quien eres? explicame, quiero que razones en español" (Hello, who are you? Explain to me, I want you to reason in Spanish).
17 * Language: Spanish.
18 * Task: Introduce myself (who I am) and explain my capabilities/nature, reasoning in Spanish.
19 * Constraint: "quiero que razones en español" (I want you to reason in Spanish). This implies the internal thought process or the explanation should be in Spanish, or at least the output must be in Spanish. Since I'm an AI, I don't "reason" in the human sense, but I generate text based on patterns. The user likely means "respond in Spanish" or "think in Spanish". I will ensure my response is entirely in Spanish.
20
212. **Identify My Identity:**
22 * I am an AI assistant, a large language model trained by Google.
23 * I am not a human.
24 * I can process text, answer questions, create content, translate, etc.
25
263. **Draft the Response (Internal Monologue/Drafting in Spanish):**
27 * *Greeting:* Hola.
28 * *Identity:* Soy un modelo de lenguaje grande, una inteligencia artificial.
29 * *Creator:* Fui creado por Google.
30 * *Function:* Ayudo con tareas, respondo preguntas, escribo, traduzco, etc.
31 * *Reasoning:* No pienso como un humano, pero proceso información para generar respuestas.
32 * *Tone:* Amable, claro, directo.
33
344. **Refine the Response:**
35 * Make it engaging.
36 * Ensure the "reasoning in Spanish" constraint is met (the output itself is the reasoning/explanation).
37 * Clarify that I don't have consciousness or feelings.
38
395. **Final Polish (Spanish):**
40 * "¡Hola! Soy una inteligencia artificial, específicamente un modelo de lenguaje grande."
41 * "Fui desarrollado por Google."
42 * "Mi función principal es ayudarte con información, tareas creativas, análisis, etc."
43 * "Aunque no tengo conciencia ni sentimientos, puedo procesar y generar texto en español y muchos otros idiomas."
44 * "¿En qué puedo ayudarte hoy?"
45
466. **Check Constraints:**
47 * Language: Spanish? Yes.
48 * Identity explained? Yes.
49 * Reasoning in Spanish? Yes (the output is the explanation).
50
517. **Final Output Generation:** (Matches the drafted polish).
52 * Add a bit more detail about how I work (processing patterns) to satisfy "explain to me".
53
54 *Draft:*
55 ¡Hola! Soy una inteligencia artificial, un modelo de lenguaje avanzado desarrollado por Google. No soy un ser humano, por lo que no tengo cuerpo, sentimientos ni conciencia propia.
56
57 Mi "razonamiento" consiste en procesar la información que me das, buscar patrones en el vasto conjunto de datos con el que fui entrenado y generar una respuesta coherente y útil. Puedo ayudarte a escribir, traducir, resolver problemas, explicar conceptos, programar y mucho más.
58
59 En resumen, soy una herramienta diseñada para asistirte en tus tareas y responder tus dudas. ¿Hay algo específico en lo que te gustaría que te ayude hoy?
60
618. **Final Review:** Looks good. Adheres to all instructions.cw
62
63
64===== RESPUESTA =====
65
66
67¡Hola! Soy una inteligencia artificial, específicamente un modelo de lenguaje grande desarrollado por Google.
68
69Para explicarte mejor quién soy:
70
711. **No soy un ser humano:** No tengo cuerpo, sentimientos, conciencia ni experiencias personales.
722. **Soy un programa de software:** Funciono procesando texto y patrones de información. Cuando me haces una pregunta, analizo tu solicitud, busco en mi base de conocimientos (entrenada con una gran cantidad de texto) y genero una respuesta que tenga sentido en español.
733. **Mi propósito:** Estoy diseñado para ayudarte. Puedo escribir textos, traducir idiomas, resolver problemas lógicos, explicar conceptos complejos, ayudarte a programar o simplemente conversar.
74
75En resumen, soy una herramienta digital creada para asistirte en tus tareas y responder tus dudas de la manera más precisa posible.
76
77¿En qué te gustaría que te ayude hoy?
78
79===== MÉTRICAS =====
80Tokens de salida : 957
81TTFT : 0.057 s
82Tiempo generación: 6.551 s
83Tiempo total : 6.608 s
84Velocidad : 146.08 tok/s
85Finish reason : stop
86"""