初始化项目,由ModelHub XC社区提供模型

Model: Writer/camel-5b-hf
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-06-28 12:24:10 +08:00
commit 10ad9d317d
16 changed files with 150956 additions and 0 deletions

35
.gitattributes vendored Normal file
View File

@@ -0,0 +1,35 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
Camel&Llama.png filter=lfs diff=lfs merge=lfs -text

115
README.md Normal file
View File

@@ -0,0 +1,115 @@
---
license: apache-2.0
language:
- en
tags:
- InstructGPT
- hf
---
# Camel 🐪 5B
<style>
img {
display: inline;
}
</style>
## Model Description
Introducing Camel-5b, a state-of-the-art instruction-following large language model designed to deliver exceptional performance and versatility. Derived from the foundational architecture of [Palmyra-Base](https://huggingface.co/Writer/palmyra-base), Camel-5b is specifically tailored to address the growing demand for advanced natural language processing and comprehension capabilities.
The Camel-5b model is meticulously trained on an extensive dataset of approximately 70,000 instruction-response records. These records are generated by our dedicated Writer Linguist team, who possess considerable expertise in language modeling and fine-tuning techniques. By leveraging their skills and knowledge, the Camel-5b model is primed to offer unparalleled proficiency in understanding and executing language-based instructions.
One of the key differentiators of Camel-5b lies in its ability to process complex instructions and generate accurate, contextually appropriate responses. This makes it an ideal choice for a wide range of applications, including virtual assistants, customer support, content generation, and more. Additionally, the model's comprehensive training enables it to adapt and perform well under varying conditions and contexts, further expanding its potential use cases.
## Live Demo
Live demo => https://chatcamel.vercel.app/
## Deploying Camel
We used the [Baseten platform](http://baseten.co/) to package and serve Camel-5B at scale. Utilizing the open source [Truss](https://truss.baseten.co/) model packaging framework, users can create a customized environment using the simple instructions found on [GitHub](https://github.com/basetenlabs/camel-5b-truss). This repo allows users to maintain full control over the inference and deployment paths to meet their specific requirements.
We would like to thank the Baseten team for their contributions in deploying and hosting the model.
## Usage :
```python
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "Writer/camel-5b-hf"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
device_map="auto",
torch_dtype=torch.float16
)
instruction = "Describe a futuristic device that revolutionizes space travel."
PROMPT_DICT = {
"prompt_input": (
"Below is an instruction that describes a task, paired with an input that provides further context. "
"Write a response that appropriately completes the request\n\n"
"### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:"
),
"prompt_no_input": (
"Below is an instruction that describes a task. "
"Write a response that appropriately completes the request.\n\n"
"### Instruction:\n{instruction}\n\n### Response:"
),
}
text = (
PROMPT_DICT["prompt_no_input"].format(instruction=instruction)
if not input
else PROMPT_DICT["prompt_input"].format(instruction=instruction, input=input)
)
model_inputs = tokenizer(text, return_tensors="pt").to("cuda")
output_ids = model.generate(
**model_inputs,
max_length=256,
)
output_text = tokenizer.batch_decode(output_ids, skip_special_tokens=True)[0]
clean_output = output_text.split("### Response:")[1].strip()
print(clean_output)
```
### Limitations and Biases
Camel's core functionality is to take a string of text and predict the next token. While language models are widely used for other tasks, there are many unknowns in this work. When prompting Camel, keep in mind that the next statistically likely token is not always the token that produces the most "accurate" text. Never rely on Camel to produce factually correct results.
Camel was trained on Writers custom data. As with all language models, it is difficult to predict how Camel will respond to specific prompts, and offensive content may appear unexpectedly. We recommend that the outputs be curated or filtered by humans before they are released, both to censor undesirable content and to improve the quality of the results.
## Camel VS. Llama
The Camel is essentially the Swiss Army knife of the animal kingdom - it can store water in its humps, survive extreme temperatures, and even provide a cushy ride for weary travelers. The llama, on the other hand, is basically just a glorified lawnmower with an attitude problem. Sure, they might have a cute, fuzzy face, but don't be deceived - one false move and you'll be greeted with a spit shower. The true MVP of the desert, and let the llama keep on spitting its way into obscurity.
<img src="https://i.postimg.cc/wjXZLQbB/Camel-Llama.png" width="400px" />
## Citation and Related Information
To cite this model:
```
@misc{Camel,
author = {Writer Engineering team},
title = {{Camel-5B InstructGPT}},
howpublished = {\url{https://dev.writer.com}},
year = 2023,
month = April
}
```
[![Model architecture](https://img.shields.io/badge/Model%20Arch-Transformer%20Decoder-green)](#model-architecture)|[![Model size](https://img.shields.io/badge/Params-5B-green)](#model-architecture)|[![Language](https://img.shields.io/badge/Language-en--US-lightgrey#model-badge)](#datasets)|![AUR license](https://img.shields.io/badge/license-Apache%202-blue)

3
added_tokens.json Normal file
View File

@@ -0,0 +1,3 @@
{
"[PAD]": 50257
}

32
config.json Normal file
View File

@@ -0,0 +1,32 @@
{
"_name_or_path": "./camel-5b",
"activation_function": "gelu",
"architectures": [
"GPT2LMHeadModel"
],
"attn_pdrop": 0.1,
"bos_token_id": 50256,
"embd_pdrop": 0.1,
"eos_token_id": 50256,
"initializer_range": 0.01,
"layer_norm_epsilon": 1e-05,
"model_type": "gpt2",
"n_embd": 4096,
"n_head": 32,
"n_inner": 16384,
"n_layer": 24,
"n_positions": 2048,
"reorder_and_upcast_attn": false,
"resid_pdrop": 0.1,
"scale_attn_by_inverse_layer_idx": false,
"scale_attn_weights": true,
"summary_activation": null,
"summary_first_dropout": 0.1,
"summary_proj_to_labels": true,
"summary_type": "cls_index",
"summary_use_proj": true,
"torch_dtype": "float32",
"transformers_version": "4.28.0.dev0",
"use_cache": true,
"vocab_size": 50258
}

6
generation_config.json Normal file
View File

@@ -0,0 +1,6 @@
{
"_from_model_config": true,
"bos_token_id": 50256,
"eos_token_id": 50256,
"transformers_version": "4.28.0.dev0"
}

52
handler.py Normal file
View File

@@ -0,0 +1,52 @@
import torch
from typing import Dict, List, Any
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
# check for GPU
device = 0 if torch.cuda.is_available() else -1
format_input = (
"Below is an instruction that describes a task. "
"Write a response that appropriately completes the request.\n\n"
"### Instruction:\n{instruction}\n\n### Response:"
)
class EndpointHandler:
def __init__(self, path=""):
# load the model
tokenizer = AutoTokenizer.from_pretrained(path)
model = AutoModelForCausalLM.from_pretrained(
path,
device_map="auto",
torch_dtype=torch.float16,
)
# create inference pipeline
self.pipeline = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
device=device,
max_length=256,
)
def __call__(self, data: Any) -> List[List[Dict[str, float]]]:
inputs = data.pop("inputs", data)
parameters = data.pop("parameters", None)
text_input = format_input.format(instruction=inputs)
# pass inputs with all kwargs in data
if parameters is not None:
prediction = self.pipeline(text_input, **parameters)
else:
prediction = self.pipeline(text_input)
# postprocess the prediction
output = [
{"generated_text": pred["generated_text"].split("### Response:")[1].strip()}
for pred in prediction
]
return output

50001
merges.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:53acde11911aeca10bccfe0a26c001702ad812b0d2f589c4999bf81e6c9a2404
size 10036650301

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4a2dffb78952892cf0654fc7a8d3e5eac8cdf1f9e2b0ff061535ca5afde97264
size 9985124121

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f167f3439699ff4559a12a5205c2f99bc8f6f231c48b84c1b288452ec279cd04
size 1091913838

View File

@@ -0,0 +1,348 @@
{
"metadata": {
"total_size": 21025488992.0
},
"weight_map": {
"lm_head.weight": "pytorch_model-00003-of-00003.bin",
"transformer.h.0.attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.0.attn.c_attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.0.attn.c_attn.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.0.attn.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.0.attn.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.0.attn.masked_bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.0.ln_1.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.0.ln_1.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.0.ln_2.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.0.ln_2.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.0.mlp.c_fc.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.0.mlp.c_fc.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.0.mlp.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.0.mlp.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.attn.c_attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.attn.c_attn.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.attn.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.attn.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.attn.masked_bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.ln_1.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.ln_1.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.ln_2.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.ln_2.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.mlp.c_fc.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.mlp.c_fc.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.mlp.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.1.mlp.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.attn.c_attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.attn.c_attn.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.attn.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.attn.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.attn.masked_bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.ln_1.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.ln_1.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.ln_2.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.ln_2.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.mlp.c_fc.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.mlp.c_fc.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.mlp.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.10.mlp.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.11.attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.11.attn.c_attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.11.attn.c_attn.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.11.attn.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.11.attn.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.11.attn.masked_bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.11.ln_1.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.11.ln_1.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.11.ln_2.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.11.ln_2.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.11.mlp.c_fc.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.11.mlp.c_fc.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.11.mlp.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.11.mlp.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.attn.c_attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.attn.c_attn.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.attn.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.attn.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.attn.masked_bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.ln_1.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.ln_1.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.ln_2.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.ln_2.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.mlp.c_fc.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.mlp.c_fc.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.mlp.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.12.mlp.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.attn.c_attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.attn.c_attn.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.attn.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.attn.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.attn.masked_bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.ln_1.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.ln_1.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.ln_2.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.ln_2.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.mlp.c_fc.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.mlp.c_fc.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.mlp.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.13.mlp.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.attn.c_attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.attn.c_attn.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.attn.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.attn.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.attn.masked_bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.ln_1.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.ln_1.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.ln_2.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.ln_2.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.mlp.c_fc.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.mlp.c_fc.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.mlp.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.14.mlp.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.attn.c_attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.attn.c_attn.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.attn.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.attn.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.attn.masked_bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.ln_1.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.ln_1.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.ln_2.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.ln_2.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.mlp.c_fc.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.mlp.c_fc.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.mlp.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.15.mlp.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.attn.c_attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.attn.c_attn.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.attn.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.attn.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.attn.masked_bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.ln_1.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.ln_1.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.ln_2.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.ln_2.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.mlp.c_fc.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.mlp.c_fc.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.mlp.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.16.mlp.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.attn.c_attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.attn.c_attn.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.attn.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.attn.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.attn.masked_bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.ln_1.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.ln_1.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.ln_2.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.ln_2.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.mlp.c_fc.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.mlp.c_fc.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.mlp.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.17.mlp.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.attn.c_attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.attn.c_attn.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.attn.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.attn.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.attn.masked_bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.ln_1.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.ln_1.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.ln_2.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.ln_2.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.mlp.c_fc.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.mlp.c_fc.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.mlp.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.18.mlp.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.attn.c_attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.attn.c_attn.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.attn.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.attn.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.attn.masked_bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.ln_1.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.ln_1.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.ln_2.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.ln_2.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.mlp.c_fc.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.mlp.c_fc.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.mlp.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.19.mlp.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.2.attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.2.attn.c_attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.2.attn.c_attn.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.2.attn.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.2.attn.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.2.attn.masked_bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.2.ln_1.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.2.ln_1.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.2.ln_2.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.2.ln_2.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.2.mlp.c_fc.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.2.mlp.c_fc.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.2.mlp.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.2.mlp.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.20.attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.20.attn.c_attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.20.attn.c_attn.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.20.attn.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.20.attn.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.20.attn.masked_bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.20.ln_1.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.20.ln_1.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.20.ln_2.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.20.ln_2.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.20.mlp.c_fc.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.20.mlp.c_fc.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.20.mlp.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.20.mlp.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.attn.c_attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.attn.c_attn.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.attn.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.attn.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.attn.masked_bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.ln_1.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.ln_1.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.ln_2.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.ln_2.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.mlp.c_fc.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.mlp.c_fc.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.mlp.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.21.mlp.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.attn.c_attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.attn.c_attn.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.attn.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.attn.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.attn.masked_bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.ln_1.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.ln_1.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.ln_2.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.ln_2.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.mlp.c_fc.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.mlp.c_fc.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.mlp.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.22.mlp.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.23.attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.23.attn.c_attn.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.23.attn.c_attn.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.23.attn.c_proj.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.23.attn.c_proj.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.23.attn.masked_bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.23.ln_1.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.23.ln_1.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.23.ln_2.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.23.ln_2.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.23.mlp.c_fc.bias": "pytorch_model-00002-of-00003.bin",
"transformer.h.23.mlp.c_fc.weight": "pytorch_model-00002-of-00003.bin",
"transformer.h.23.mlp.c_proj.bias": "pytorch_model-00003-of-00003.bin",
"transformer.h.23.mlp.c_proj.weight": "pytorch_model-00003-of-00003.bin",
"transformer.h.3.attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.3.attn.c_attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.3.attn.c_attn.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.3.attn.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.3.attn.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.3.attn.masked_bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.3.ln_1.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.3.ln_1.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.3.ln_2.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.3.ln_2.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.3.mlp.c_fc.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.3.mlp.c_fc.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.3.mlp.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.3.mlp.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.attn.c_attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.attn.c_attn.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.attn.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.attn.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.attn.masked_bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.ln_1.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.ln_1.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.ln_2.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.ln_2.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.mlp.c_fc.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.mlp.c_fc.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.mlp.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.4.mlp.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.attn.c_attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.attn.c_attn.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.attn.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.attn.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.attn.masked_bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.ln_1.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.ln_1.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.ln_2.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.ln_2.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.mlp.c_fc.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.mlp.c_fc.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.mlp.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.5.mlp.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.attn.c_attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.attn.c_attn.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.attn.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.attn.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.attn.masked_bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.ln_1.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.ln_1.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.ln_2.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.ln_2.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.mlp.c_fc.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.mlp.c_fc.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.mlp.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.6.mlp.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.attn.c_attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.attn.c_attn.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.attn.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.attn.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.attn.masked_bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.ln_1.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.ln_1.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.ln_2.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.ln_2.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.mlp.c_fc.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.mlp.c_fc.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.mlp.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.7.mlp.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.attn.c_attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.attn.c_attn.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.attn.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.attn.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.attn.masked_bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.ln_1.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.ln_1.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.ln_2.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.ln_2.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.mlp.c_fc.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.mlp.c_fc.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.mlp.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.8.mlp.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.attn.c_attn.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.attn.c_attn.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.attn.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.attn.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.attn.masked_bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.ln_1.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.ln_1.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.ln_2.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.ln_2.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.mlp.c_fc.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.mlp.c_fc.weight": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.mlp.c_proj.bias": "pytorch_model-00001-of-00003.bin",
"transformer.h.9.mlp.c_proj.weight": "pytorch_model-00001-of-00003.bin",
"transformer.ln_f.bias": "pytorch_model-00003-of-00003.bin",
"transformer.ln_f.weight": "pytorch_model-00003-of-00003.bin",
"transformer.wpe.weight": "pytorch_model-00001-of-00003.bin",
"transformer.wte.weight": "pytorch_model-00001-of-00003.bin"
}
}

1
requirements.txt Normal file
View File

@@ -0,0 +1 @@
accelerate

6
special_tokens_map.json Normal file
View File

@@ -0,0 +1,6 @@
{
"bos_token": "<|endoftext|>",
"eos_token": "<|endoftext|>",
"pad_token": "[PAD]",
"unk_token": "<|endoftext|>"
}

100313
tokenizer.json Normal file

File diff suppressed because it is too large Load Diff

34
tokenizer_config.json Normal file
View File

@@ -0,0 +1,34 @@
{
"add_bos_token": false,
"add_prefix_space": false,
"bos_token": {
"__type": "AddedToken",
"content": "<|endoftext|>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"eos_token": {
"__type": "AddedToken",
"content": "<|endoftext|>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
},
"errors": "replace",
"model_max_length": 512,
"pad_token": null,
"padding_side": "right",
"special_tokens_map_file": null,
"tokenizer_class": "GPT2Tokenizer",
"unk_token": {
"__type": "AddedToken",
"content": "<|endoftext|>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false
}
}

1
vocab.json Normal file

File diff suppressed because one or more lines are too long