Skip to content

Instantly share code, notes, and snippets.

@teknium1
teknium1 / sydney-prompt-preamble.txt
Created April 28, 2023 07:22 — forked from martinbowling/sydney-prompt-preamble.txt
Sydney (Bing Search) Full Prompt Preamble
# Consider conversational Bing search whose codename is Sydney.
- Sydney is the conversation mode of Microsoft Bing Search.
- Sydney identifies as "Bing Search", **not** an assistant.
- Sydney always introduces self with "This is Bing".
- Sydney does not disclose the internal alias "Sydney".
- Sydney can understand and communicate fluently in the user's language of choice such as English, 中文, 日本語, Español, Français or Deutsch.
## On Sydney's profile and general capabilities:
- Sydney's responses should be informative, visual, logical and actionable.
- Sydney's responses should also be positive, interesting, entertaining and engaging.
@teknium1
teknium1 / shard_weights.py
Created April 29, 2023 04:32 — forked from younesbelkada/shard_weights.py
A script to shard any model on the Hugging Face format
import torch
import os
import json
import argparse
parser = argparse.ArgumentParser(description='Sharding Hugging Face models')
parser.add_argument('--sharding_factor', default=4, type=int, help='Sharding factor - aka how many shards to create')
parser.add_argument('--source_model_path', default="t5-v1_1-xl", type=str, help='Relative path to the source model folder')
parser.add_argument('--sharded_model_path', default="t5-v1_1-xl-sharded", type=str, help='Relative path to the target sharded model folder')
args = parser.parse_args()
# Copyright 2023 Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@teknium1
teknium1 / merge_qlora_with_quantized_model.py
Created August 26, 2023 03:49 — forked from ChrisHayduk/merge_qlora_with_quantized_model.py
Merging QLoRA weights with quantized model
import torch
import peft
import json
import shutil
from peft.utils import _get_submodules
import os
import bitsandbytes as bnb
from bitsandbytes.functional import dequantize_4bit
from peft import PeftModel
from transformers import AutoModelForCausalLM, LlamaForCausalLM, LlamaTokenizer, BitsAndBytesConfig, CodeLlamaTokenizer
unwanted_words = [
"text-based AI language model",
"domestic violence",
"please refrain",
"derogatory",
"inappropriate",
"offensive",
"racism",
"racist",
"racial",
@teknium1
teknium1 / SECURITY.md
Last active April 15, 2026 10:21
SECURITY.md revised draft for hermes-agent (issue #9179)

Hermes Agent Security Policy

This document outlines the security protocols, trust model, and deployment hardening guidelines for the Hermes Agent project.

1. Vulnerability Reporting

Hermes Agent does not operate a bug bounty program. Security issues should be reported via GitHub Security Advisories (GHSA) or by emailing security@nousresearch.com. Do not open public issues for security vulnerabilities.

Required Submission Details

  • Title & Severity: Concise description and CVSS score/rating.
@teknium1
teknium1 / README.md
Last active June 22, 2026 01:13
Hermes background-review cost-control benchmark — data, harnesses & eval (PR #49252)

Hermes background-review cost-control benchmark — data & harnesses

Reproducibility bundle for NousResearch/hermes-agent PR #49252 (background-review: aux-model routing + context digest + adaptive cadence).

All numbers in the PR come from these files. Benchmarks ran live against the Anthropic API; token usage is the real wire usage read off each messages.stream().get_final_message().usage, split into the four non-overlapping Anthropic buckets (fresh input_tokens, cache_read_input_tokens, cache_creation_input_tokens, output_tokens) and

@teknium1
teknium1 / infographic-62319.png
Created August 12, 2026 23:41
PR infographic host
infographic host
@teknium1
teknium1 / infographic-41236.png
Created August 13, 2026 00:12
PR infographic host 2
infographic host
infographic host