Files
jsteer/jsteer/__init__.py
T
wassnameandClaudypoo bd84c77ceb demo: print raw generation (skip_special_tokens=False), drop split_think
User: dont fabricate think tokens; show raw so it's debuggable. The chat
template already emits real <think>/</think> -- parsing them out and re-wrapping
with my own tags hid the raw text and invented tokens. Now decode with special
tokens on and print the model's output verbatim (real <think>, <|im_end|>).

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
2026-07-10 20:17:32 +08:00

16 lines
678 B
Python

"""jsteer: fit a model's full Jacobian once, then steer any word or persona.
from jsteer import Jacobian
jac = Jacobian.fit(model, tok, prompts) # expensive, once, cacheable
v = jac.word_vector(model, tok, ["authority"]) # instant matvec
with v(model, C=8): # steering-lite runtime
model.generate(**inputs)
"""
from . import applies # noqa: F401 -- registers methods into steering-lite's REGISTRY
from .demo import chat_input, show_steer
from .jacobian import Jacobian
from .vjp import pullback_vjp, word_vector_vjp
__all__ = ["Jacobian", "pullback_vjp", "word_vector_vjp",
"show_steer", "chat_input"]