Skip to content

Instantly share code, notes, and snippets.

@chuyqa
chuyqa / qwen3.5_chat_template.jinja
Last active April 10, 2026 21:17 — forked from sudoingX/qwen3.5_chat_template.jinja
Patched Jinja template for Qwen 3.5 27B - fixes developer role crash + preserves thinking mode (thinking = 1). Drop-in replacement for agent tools (OpenCode, Claude Code, Continue, Cursor, Aider). Without this patch, --chat-template chatml silently kills thinking mode.
{%- set image_count = namespace(value=0) %}
{%- set video_count = namespace(value=0) %}
{%- macro render_content(content, do_vision_count, is_system_content=false) %}
{%- if content is string %}
{{- content }}
{%- elif content is iterable and content is not mapping %}
{%- for item in content %}
{%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
{%- if is_system_content %}
{{- raise_exception('System message cannot contain images.') }}
@chuyqa
chuyqa / Leibniz_Nilakantha_Arctan_Computing_Pi.ipynb
Last active March 14, 2025 17:13
Computing Pi via Leibniz, Nilakantha, Machin's formulas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import json
import IPython
class NotebookInfo:
def __init__(self):
self.ip = IPython.get_ipython()
self._notebook_path = None
self._notebook_content = None
@property
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chuyqa
chuyqa / PG_Rag_Benchmarks.ipynb
Last active July 2, 2024 23:16
PGVector Local LLM
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.