Skip to content

Instantly share code, notes, and snippets.

View theobjectivedad's full-sized avatar

The Objective Dad theobjectivedad

View GitHub Profile
@theobjectivedad
theobjectivedad / autogptq_459_workaround.md
Created April 4, 2024 12:25
AutoGPTQ Issue 459 Workaround

This is a monkeypatch to workaround AutoGPTQ issue 459:

import os
import time
from logging import getLogger

import torch
import torch.nn as nn
import transformers
@theobjectivedad
theobjectivedad / pydanticai_vllm_monkeypatch.md
Created April 1, 2025 15:59
PydanticAI to VLLM Tool Calling Monkeypatch

PydanticAI

This is an ugly and minimally tested workaround for folks who would like to use PydanticAI response model formatting with VLLM prior to 13002 being merged into VLLM. I've tested this avainst PydanticAI 0.0.46:

First apply this monkeypatch to PydanticAI. Basically it allows agent runs to specify named tools on model settings:

# 2025-03-30 Patched 0.0.46
# pylint: disable=protected-access
async def patched_completions_create(
@theobjectivedad
theobjectivedad / vllm_build.md
Created April 15, 2025 10:35
Building a VLLM Container Locally

Building a VLLM Container Locally

This is a quick guide that demonstrates how to build a VLLM container locally.

First clone the VLLM branch/fork you would like to build:

git clone https://github.com/theobjectivedad/vllm.git src
cd src
git checkout outlines_subschemas
@theobjectivedad
theobjectivedad / fast_agent_monkeypatch_88.py
Created April 17, 2025 12:35
FastAgent Issue 88 Monkeypatch
from typing import List, Optional
from mcp.types import (
EmbeddedResource,
ImageContent,
TextContent,
)
from mcp_agent import PromptMessageMultipart, RequestParams, TextContent
from mcp_agent.agents.workflow.chain_agent import ChainAgent
from mcp_agent.core.prompt import Prompt
@theobjectivedad
theobjectivedad / bitwarden_backup.sh
Created June 17, 2025 15:48
Bitwarden Backup Script
#!/bin/bash
# Copyright (c) 2025, The Objective Dad
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the “Software”), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial