Skip to content

Instantly share code, notes, and snippets.

@theharshith
theharshith / main.py
Created August 13, 2025 18:30
Contrastive Decoding
import transformers as tr
import torch
import torch.nn.functional as F
import math
amateur_path = 'Qwen/Qwen2.5-Coder-0.5B-Instruct'
expert_path = 'Qwen/Qwen2.5-Coder-1.5B-Instruct' #models of the same family
tokenizer = tr.AutoTokenizer.from_pretrained(amateur_path)

To install OpenCV with CUDA support on your NVIDIA Jetson Nano, follow these steps:

Step 1: Update and Upgrade the System First, ensure that your system is updated:

sudo apt-get update sudo apt-get upgrade Step 2: Install Dependencies Install the required dependencies: