Skip to content

Instantly share code, notes, and snippets.

View MillionthOdin16's full-sized avatar
💭
OH HAI

MillionthOdin16 MillionthOdin16

💭
OH HAI
View GitHub Profile
@MillionthOdin16
MillionthOdin16 / convert.py
Created April 2, 2023 14:49
Import pytorch model files (such as pytorch_model-00001-of-00006.bin) into the ggml format. Params.json (for llama 13B) included as example.
from sentencepiece import SentencePieceProcessor # type: ignore
import json, struct, os, re, zipfile, pickle, itertools, sys, enum, threading, concurrent.futures, argparse
from pathlib import Path
import numpy as np
from collections import namedtuple
from typing import Optional, Callable, Type, Any, Iterable, IO, Sequence, Union, TypeVar
from dataclasses import dataclass
NDArray = np.ndarray[Any, Any]
@MillionthOdin16
MillionthOdin16 / artifacts...BradarrCoin_metadata.json
Created July 26, 2022 18:42
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
{
"compiler": {
"version": "0.8.7+commit.e28d00a7"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
@MillionthOdin16
MillionthOdin16 / [email protected]@4.7.1...access...Ownable.sol
Created July 26, 2022 18:38
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
@MillionthOdin16
MillionthOdin16 / artifacts...BradarrCoin.json
Created July 26, 2022 18:36
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
This file has been truncated, but you can view the full file.
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
@MillionthOdin16
MillionthOdin16 / [email protected]@4.7.1...access...Ownable.sol
Created July 26, 2022 18:34
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to