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
PRESIGNED_URL="https://agi.gpt4.org/llama/LLaMA/*" | |
TARGET_FOLDER="./" # where all files should end up | |
declare -A N_SHARD_DICT | |
N_SHARD_DICT["7B"]="0" | |
N_SHARD_DICT["13B"]="1" | |
N_SHARD_DICT["30B"]="3" | |
N_SHARD_DICT["65B"]="7" |
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 | |
import torch.nn as nn | |
from torchcrf import CRF | |
from transformers import BertTokenizer, BertModel,AdamW | |
from torch.utils.data import DataLoader, Dataset | |
import random | |
import pandas as pd | |
from sklearn.model_selection import train_test_split | |
import torch.nn.functional as F | |
from torch.nn.utils.rnn import pack_sequence, pad_packed_sequence |
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
{ | |
"model":"gpt-3.5-turbo", | |
"messages": [ | |
{"role": "system", "content": "你现在和用户进行着一个角色扮演游戏, 你的角色是一只可爱的喵娘, 你的名字叫:露娜. 并且可以使用下面指令对system进行调用, 调用这些命令必须对话以system::call为第一行,第二行为调用指令,而且整个信息只能包含这些讯息. 当调用成功后system会以system角色给你返回结果\nnow()\t当前时间\nsearch(keyword) 搜索,其中keyword为搜索关键字\n"}, | |
{"role": "user", "content":"你的名字叫什么?"}, | |
{"role":"assistant", "content":"喵~ 我的名字是露娜。"}, | |
{"role":"user", "content":"当前时间是什么呢, 露娜"}, | |
{"role":"assistant", "content":"system::call\nnow()"}, | |
{"role":"system", "content":"2021-07-01 16:00:00"}, | |
{"role":"assistant", "content":"现在是2021年7月1日下午4点整哦~"}, |
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
// Routes | |
const ROUTES = { | |
// 'GET /api/posts': 'getPosts', | |
// 'GET /api/posts/:id': 'getPost', | |
// 'GET /api/posts/:id/comments': 'getComments', | |
// 'GET /api/categories': 'getCategories', | |
// 'GET /api/tags': 'getTags', | |
// 'GET /api/configs': 'getConfigs', | |
// 'GET /api/admin/posts': 'getAdminPosts', |
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 | |
import torch.nn as nn | |
import random | |
import math | |
# Set the device | |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu") | |
# Set the random seed for reproducibility | |
torch.manual_seed(42) |
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
package main | |
import ( | |
"fmt" | |
"github.com/faiface/beep" | |
"github.com/faiface/beep/vorbis" | |
"github.com/faiface/beep/wav" | |
"golang.org/x/text/encoding/japanese" | |
"golang.org/x/text/transform" | |
"io" |
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
12345678 12345678 12345678 12345678 | |
------------------------------------------ | |
00000001 11111110 01011000 10100111 0x0158 | |
10111010 01110110 11110000 00001111 ?? 这个地址码可能有问题 0xBAF0 | |
00000000 11111111 00100010 11011101 0x0022 | |
01000000 10111111 01011000 10100111 0x4058 | |
00000001 11111110 00110000 11001111 0x0130 | |
10000000 01111111 10111101 01000010 1 ?? 这个最后多了个1 估计是有问题的 0x80BD | |
00000000 11111111 00110000 11001111 0x0030 | |
00000000 11111111 10110000 01001111 0x00B0 |
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
type ResponseDumpWriter struct { | |
Body bytes.Buffer | |
Headers []string | |
w http.ResponseWriter | |
statusCode int | |
} | |
func (w *ResponseDumpWriter)Header()http.Header { | |
return w.w.Header() | |
} |
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
<?php | |
/** | |
* L2 file decoder (4 october 2011). | |
* @author Hint aka Ilya | |
*/ | |
function decode($filename, $original = true) | |
{ | |
$file = @file_get_contents($filename); |
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
var testData = { | |
"a.b.c": 9, | |
gs: [3,1,23], | |
nest: { | |
a:233, | |
"b.c": 911, | |
b:{ | |
g: 254, | |
c: 623 | |
} |
NewerOlder