初始化项目,由ModelHub XC社区提供模型
Model: nuprl/MultiPL-T-StarCoderBase_1b Source: Original Platform
This commit is contained in:
35
.gitattributes
vendored
Normal file
35
.gitattributes
vendored
Normal 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
|
||||
*.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
|
||||
73
README.md
Normal file
73
README.md
Normal file
@@ -0,0 +1,73 @@
|
||||
---
|
||||
license: bigscience-openrail-m
|
||||
library_name: transformers
|
||||
tags:
|
||||
- code
|
||||
- gpt_bigcode
|
||||
datasets:
|
||||
- nuprl/MultiPL-T
|
||||
metrics:
|
||||
- code_eval
|
||||
model-index:
|
||||
- name: MultiPLCoder-1b-OCaml
|
||||
results:
|
||||
- task:
|
||||
type: text-generation
|
||||
dataset:
|
||||
name: MultiPL-HumanEval (Lua)
|
||||
type: nuprl/MultiPL-E
|
||||
metrics:
|
||||
- type: pass@1
|
||||
value: 0.173
|
||||
name: pass@1
|
||||
verified: true
|
||||
- type: pass@1
|
||||
value: 0.113
|
||||
name: pass@1
|
||||
verified: true
|
||||
- type: pass@1
|
||||
value: 0.097
|
||||
name: pass@1
|
||||
verified: true
|
||||
---
|
||||
# MultiPLCoder-1b
|
||||
|
||||
1 billion parameter version of MultiPLCoder, a set of StarCoder-based models finetuned on the [MultiPL-T dataset](https://huggingface.co/datasets/nuprl/MultiPL-T).
|
||||
These models are state-of-the-art at low-resource languages, such as: Lua, Racket, and OCaml.
|
||||
|
||||
|
||||
## Language Revision Index
|
||||
|
||||
This is the revision index for the best-performing models for their respective langauge.
|
||||
|
||||
| Langauge | Revision ID | Epoch |
|
||||
| ------------- | ----------- | ----- |
|
||||
| Lua | `7e96d931547e342ad0661cdd91236fe4ccf52545` | 3 |
|
||||
| Racket | `2cdc541bee1db4da80c0b43384b0d6a0cacca5b2` | 5 |
|
||||
| OCaml | `e8a24f9e2149cbda8c3cca264a53c2b361b7a031` | 6 |
|
||||
|
||||
## Usage
|
||||
|
||||
To utilize one of the models in this repository, you must first select a commit revision for that model from the table above.
|
||||
For example, to use the Lua model:
|
||||
```py
|
||||
from transformers import AutoTokenizer, AutoModelForCausalLM
|
||||
tokenizer = AutoTokenizer.from_pretrained("nuprl/MultiPLCoder-1b")
|
||||
lua_revision="7e96d931547e342ad0661cdd91236fe4ccf52545"
|
||||
model = AutoModelForCausalLM.from_pretrained("nuprl/MultiPLCoder-1b", revision=lua_revision)
|
||||
```
|
||||
|
||||
Note that the model's default configuration does not enable caching, therefore you must specify to use the cache on generation.
|
||||
```py
|
||||
toks = tokenizer.encode("-- Hello World", return_tensors="pt")
|
||||
out = model.generate(toks, use_cache=True, do_sample=True, temperature=0.2, top_p=0.95, max_length=50)
|
||||
print(tokenizer.decode(out[0], skip_special_tokens=True))
|
||||
```
|
||||
```
|
||||
-- Hello World!
|
||||
-- :param name: The name of the person to say hello to
|
||||
-- :return: A greeting
|
||||
local function say_hello(name)
|
||||
return "Hello ".. name
|
||||
end
|
||||
```
|
||||
39
config.json
Normal file
39
config.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"_name_or_path": "more_stack/rkt/checkpoint_final",
|
||||
"activation_function": "gelu_pytorch_tanh",
|
||||
"architectures": [
|
||||
"GPTBigCodeForCausalLM"
|
||||
],
|
||||
"attention_softmax_in_fp32": true,
|
||||
"attn_pdrop": 0.1,
|
||||
"bos_token_id": 0,
|
||||
"embd_pdrop": 0.1,
|
||||
"eos_token_id": 0,
|
||||
"inference_runner": 0,
|
||||
"initializer_range": 0.02,
|
||||
"layer_norm_epsilon": 1e-05,
|
||||
"max_batch_size": null,
|
||||
"max_sequence_length": null,
|
||||
"model_type": "gpt_bigcode",
|
||||
"multi_query": true,
|
||||
"n_embd": 2048,
|
||||
"n_head": 16,
|
||||
"n_inner": 8192,
|
||||
"n_layer": 24,
|
||||
"n_positions": 8192,
|
||||
"pad_key_length": true,
|
||||
"pre_allocate_kv_cache": false,
|
||||
"resid_pdrop": 0.1,
|
||||
"scale_attention_softmax_in_fp32": true,
|
||||
"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": "bfloat16",
|
||||
"transformers_version": "4.40.0",
|
||||
"use_cache": false,
|
||||
"validate_runner_input": true,
|
||||
"vocab_size": 49152
|
||||
}
|
||||
6
generation_config.json
Normal file
6
generation_config.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"_from_model_config": true,
|
||||
"bos_token_id": 0,
|
||||
"eos_token_id": 0,
|
||||
"transformers_version": "4.40.0"
|
||||
}
|
||||
48892
merges.txt
Normal file
48892
merges.txt
Normal file
File diff suppressed because it is too large
Load Diff
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1313129f3105132d439326b5289f3ba8d7594f1c6701e5a570ba716d85f59861
|
||||
size 2274445296
|
||||
3
pytorch_model.bin
Normal file
3
pytorch_model.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:503988ef3250f9e00eeec150cd90421a64988db58796a3cb63354870c35d1023
|
||||
size 2274505693
|
||||
26
special_tokens_map.json
Normal file
26
special_tokens_map.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"additional_special_tokens": [
|
||||
"<|endoftext|>",
|
||||
"<fim_prefix>",
|
||||
"<fim_middle>",
|
||||
"<fim_suffix>",
|
||||
"<fim_pad>",
|
||||
"<filename>",
|
||||
"<gh_stars>",
|
||||
"<issue_start>",
|
||||
"<issue_comment>",
|
||||
"<issue_closed>",
|
||||
"<jupyter_start>",
|
||||
"<jupyter_text>",
|
||||
"<jupyter_code>",
|
||||
"<jupyter_output>",
|
||||
"<empty_output>",
|
||||
"<commit_before>",
|
||||
"<commit_msg>",
|
||||
"<commit_after>",
|
||||
"<reponame>"
|
||||
],
|
||||
"bos_token": "<|endoftext|>",
|
||||
"eos_token": "<|endoftext|>",
|
||||
"unk_token": "<|endoftext|>"
|
||||
}
|
||||
98257
tokenizer.json
Normal file
98257
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
31
tokenizer_config.json
Normal file
31
tokenizer_config.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"add_prefix_space": false,
|
||||
"additional_special_tokens": [
|
||||
"<|endoftext|>",
|
||||
"<fim_prefix>",
|
||||
"<fim_middle>",
|
||||
"<fim_suffix>",
|
||||
"<fim_pad>",
|
||||
"<filename>",
|
||||
"<gh_stars>",
|
||||
"<issue_start>",
|
||||
"<issue_comment>",
|
||||
"<issue_closed>",
|
||||
"<jupyter_start>",
|
||||
"<jupyter_text>",
|
||||
"<jupyter_code>",
|
||||
"<jupyter_output>",
|
||||
"<empty_output>",
|
||||
"<commit_before>",
|
||||
"<commit_msg>",
|
||||
"<commit_after>",
|
||||
"<reponame>"
|
||||
],
|
||||
"bos_token": "<|endoftext|>",
|
||||
"clean_up_tokenization_spaces": true,
|
||||
"eos_token": "<|endoftext|>",
|
||||
"model_max_length": 1000000000000000019884624838656,
|
||||
"tokenizer_class": "GPT2Tokenizer",
|
||||
"unk_token": "<|endoftext|>",
|
||||
"vocab_size": 49152
|
||||
}
|
||||
1
vocab.json
Normal file
1
vocab.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user