This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"choices": [ | |
{ | |
"finish_reason": "length", | |
"index": 0, | |
"logprobs": null, | |
"message": { | |
"content": "Jeff Walker's Product Launch Formula is a comprehensive system", | |
"name": null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Metal | |
import MetalPerformanceShadersGraph | |
let type = MTLDataType.float; | |
let dataType = type; | |
var B = 2; | |
var M = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Tensor{ | |
id: usize | |
} | |
struct Linear{ | |
weight: Tensor, | |
bias: Option<Tensor>, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import http from 'k6/http'; | |
import {sleep} from 'k6'; | |
import { randomIntBetween } from 'https://jslib.k6.io/k6-utils/1.2.0/index.js'; | |
const token = __ENV.API_TOKEN; | |
const MODEL_ID = "f-1" // Or "s-1" | |
export const options = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.globl <gemm_f16::gemm::f16::GEMM as lazy_static::LazyStatic>::initialize | |
.p2align 2 | |
<gemm_f16::gemm::f16::GEMM as lazy_static::LazyStatic>::initialize: | |
Lfunc_begin18: | |
.cfi_startproc | |
sub sp, sp, #48 | |
.cfi_def_cfa_offset 48 | |
stp x29, x30, [sp, #32] | |
add x29, sp, #32 | |
.cfi_def_cfa w29, 16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from transformers import AutoTokenizer, RobertaForMaskedLM, AutoConfig | |
from transformers.pipelines.base import infer_framework_load_model | |
from os import path | |
from huggingface_hub import hf_hub_download | |
def compare_models(pt_mdl, sf_mdl): | |
# A blend of convert.py's generalized check_final_model with concrete usage example to demonstrate | |
sf_dict = sf_mdl.state_dict() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by mfuntowicz on 3/28/23. | |
// | |
// ! Requires std=c++20 | |
#include <span> | |
#include "safetensors.hpp" | |
#include "nlohmann/json.hpp" | |
namespace huggingface::safetensors { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""Toggle the bit at the specified offset. | |
Syntax: <cmdname> filename bit-offset""" | |
import sys | |
import os | |
import random | |
fname = sys.argv[1] | |
# Convert bit offset to bytes + leftover bits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------- | |
conll2003 | |
=========================== | |
StanfordAIMI/stanford-deidentifier-base | |
Results : 0.93 (4846/5233 (ignored 8808) | |
=========================== | |
Davlan/bert-base-multilingual-cased-ner-hrl | |
Results : 0.98 (604/618 (ignored 13423) | |
=========================== | |
dslim/bert-base-NER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from safetensors import safe_open | |
import torch | |
from huggingface_hub import hf_hub_download | |
filenames = [ | |
"safety_checker/model.safetensors", | |
"safety_checker/pytorch_model.bin", | |
"vae/diffusion_pytorch_model.safetensors", | |
"vae/diffusion_pytorch_model.bin", |
NewerOlder