NovelAI / genji-python-6B

huggingface.co
Total runs: 15
24-hour runs: 0
7-day runs: 2
30-day runs: 3
Model's Last Updated: August 07 2021
text-generation

Introduction of genji-python-6B

Model Details of genji-python-6B

Genji-python 6B

For example usage or to easily use the model you can check our colab notebook: Notebook

Model Description

Genji is a transformer model finetuned on EleutherAI's GPT-J 6B model. This particular model is trained on python only code approaching 4GB in size.

Hyperparameter Value
n_parameters 6,053,381,344
n_layers 28*
d_model 4,096
d_ff 16,384
n_heads 16
d_head 256
n_ctx 2,048
n_vocab 50,400 (same tokenizer as GPT-2/3)
position encoding Rotary position encodings (RoPE)
RoPE dimensions 64

* each layer consists of one feedforward block and one self attention block

The model consists of 28 layers with a model dimension of 4096, and a feedforward dimension of 16384. The model dimension is split into 16 heads, each with a dimension of 256. Rotary position encodings (RoPE) was applied to 64 dimensions of each head. The model is trained with a tokenization vocabulary of 50257, using the same set of BPEs as GPT-2/GPT-3.

Training data

GPT-J 6B was pretrained on the Pile , a large scale curated dataset created by EleutherAI for the purpose of training this model. After the pre-training, it's finetuned on the python code that was taken from the Pile.

Training procedure

Genji-python-6B is trained for 20k steps on around 655 million tokens with learning rate of 2e-06

Intended Use

This model is trained for assistence on writing python code and having fun trying weird stuff with it.

How to use

This model is only usable with our fork because GPT-J is not merged to the main transformers repo yet. When it's merged, we will make this model easily loadable. For now, you need to use this fork: Fork

to install with pip:

pip install git+https://github.com/finetuneanon/transformers@gpt-neo-localattention3-rp-b

This model takes more than 16 gigs of RAM to load. If you want more efficient and faster loading, please check our split model. We recommend the usage of the model as FP16. That way, it fits in 16GB VRAM cards.

How to use:

from transformers import (
    AutoTokenizer,
    AutoModelForCausalLM,
    GPTNeoForCausalLM,
)

model = AutoModelForCausalLM.from_pretrained("NovelAI/genji-python-6B", use_auth_token=True).half().eval().cuda()
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neo-2.7B")

text = '''def print_customer_name'''

tokens = tokenizer(text, return_tensors="pt").input_ids
generated_tokens = model.generate(tokens.long().cuda(), use_cache=True, do_sample=True, top_k=50, temperature=0.3, top_p=0.9, repetition_penalty=1.125, min_length=1, max_length=len(tokens[0]) + 400, pad_token_id=tokenizer.eos_token_id)
last_tokens = generated_tokens[0][len(tokens[0]):]
generated_text = tokenizer.decode(last_tokens)
print("Generation:\n" + generated_text)

When ran, this code generates:

Prompt:
def print_customer_name
Generation:
(self, customer):
        """Print the name of a customer."""
        if not self.is_valid():
            return

        print("Customer: {}".format(customer))

For example usage, you can see our colab notebook as well: Notebook

Eval results

TBD

Acknowledgements

This project was possible because of the compute provided by the TPU Research Cloud

and EleutherAI for pretraining of the GPT-J 6B.

Thanks to everyone who contributed to this project!

Runs of NovelAI genji-python-6B on huggingface.co

15
Total runs
0
24-hour runs
1
3-day runs
2
7-day runs
3
30-day runs

More Information About genji-python-6B huggingface.co Model

More genji-python-6B license Visit here:

https://choosealicense.com/licenses/apache-2.0

genji-python-6B huggingface.co

genji-python-6B huggingface.co is an AI model on huggingface.co that provides genji-python-6B's model effect (), which can be used instantly with this NovelAI genji-python-6B model. huggingface.co supports a free trial of the genji-python-6B model, and also provides paid use of the genji-python-6B. Support call genji-python-6B model through api, including Node.js, Python, http.

genji-python-6B huggingface.co Url

https://huggingface.co/NovelAI/genji-python-6B

NovelAI genji-python-6B online free

genji-python-6B huggingface.co is an online trial and call api platform, which integrates genji-python-6B's modeling effects, including api services, and provides a free online trial of genji-python-6B, you can try genji-python-6B online for free by clicking the link below.

NovelAI genji-python-6B online free url in huggingface.co:

https://huggingface.co/NovelAI/genji-python-6B

genji-python-6B install

genji-python-6B is an open source model from GitHub that offers a free installation service, and any user can find genji-python-6B on GitHub to install. At the same time, huggingface.co provides the effect of genji-python-6B install, users can directly use genji-python-6B installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

genji-python-6B install url in huggingface.co:

https://huggingface.co/NovelAI/genji-python-6B

Url of genji-python-6B

genji-python-6B huggingface.co Url

Provider of genji-python-6B huggingface.co

NovelAI
ORGANIZATIONS

Other API from NovelAI

huggingface.co

Total runs: 17
Run Growth: 3
Growth Rate: 17.65%
Updated:August 10 2022