Skip to content

Instantly share code, notes, and snippets.

@jiamingkong
jiamingkong / poc_state_rwkv.py
Created May 17, 2023 06:46
Proof of Concept for State Caching in RWKV
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import os, gc
from huggingface_hub import hf_hub_download
from pynvml import *
import torch
from copy import deepcopy
nvmlInit()
gpu_h = nvmlDeviceGetHandleByIndex(0)
ctx_limit = 4096
@jiamingkong
jiamingkong / langchain.ipynb
Created May 1, 2023 04:07
Using RWKV in langchain
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.