Skip to content

Instantly share code, notes, and snippets.

@RylanSchaeffer
RylanSchaeffer / gist:8198233a445ab3373aff01b038cc4b8b
Created March 10, 2024 21:18
Llava Vicuna7B RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! (when checking argument for argument weight in method wrapper_CUDA__native_layer_norm)
import os
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "0,1"
from accelerate import Accelerator
import dataclasses
from enum import auto, Enum
import torch
from typing import Any, Dict, List, Optional, Tuple
@RylanSchaeffer
RylanSchaeffer / tmp.txt
Created February 22, 2022 17:44
StanfordNeuroAI-Surface-Normals server's received string
b'{"prolificID":null,"studyID":null,"sessionID":null,"type":"jspsych-surface-normals","dbname":"human_physics_benchmarking","colname":"surface_normals","iterationName":"20220214","devMode":false,"trialNum":0,"numTrials":69,"condition":"photo","imageURL":"/static/images/nsd_coco_train2017/584.jpg","arrowPosition":[-3.25,0.15,0],"trueArrowDirection":[0.173,0.866,0.468],"randomizeArrowInitialDirection":true,"useCueDuration":false,"trialType":"supervised","cue_duration":1000,"prompt":null,"startTrialTime":1645551655503,"endTrialTime":1645551659272,"totalTrialTime":3769,"arrowDirectionTrajectory":[[0.9913326295791102,0.12042431742409547,0.052512867991642925],[0.9221728677284222,-0.33540043605817293,0.1926233358591984],[0.9244519820379675,-0.3286697592845731,0.19329956605718046],[0.9289048083416559,-0.31505410722136207,0.19461954311605503],[0.9292892042284622,-0.3106339967165445,0.19982015661173344],[0.9311314014803124,-0.3002261123686343,0.20702317413595492],[0.9329450747952013,-0.28908771238811765,0.2145734884872