mrm8488 / codeBERTaJS

huggingface.co
Total runs: 53
24-hour runs: 6
7-day runs: 13
30-day runs: 33
Model's Last Updated: May 21 2021
fill-mask

Introduction of codeBERTaJS

Model Details of codeBERTaJS

CodeBERTaJS

CodeBERTaJS is a RoBERTa-like model trained on the CodeSearchNet dataset from GitHub for javaScript by Manuel Romero

The tokenizer is a Byte-level BPE tokenizer trained on the corpus using Hugging Face tokenizers .

Because it is trained on a corpus of code (vs. natural language), it encodes the corpus efficiently (the sequences are between 33% to 50% shorter, compared to the same corpus tokenized by gpt2/roberta).

The (small) model is a 6-layer, 84M parameters, RoBERTa-like Transformer model – that’s the same number of layers & heads as DistilBERT – initialized from the default initialization settings and trained from scratch on the full javascript corpus (120M after preproccessing) for 2 epochs.

Quick start: masked language modeling prediction
JS_CODE = """
async function createUser(req, <mask>) {
  if (!validUser(req.body.user)) {
\t  return res.status(400);
  }
  user = userService.createUser(req.body.user);
  return res.json(user);
}
""".lstrip()
Does the model know how to complete simple JS/express like code?
from transformers import pipeline

fill_mask = pipeline(
    "fill-mask",
    model="mrm8488/codeBERTaJS",
    tokenizer="mrm8488/codeBERTaJS"
)

fill_mask(JS_CODE)

## Top 5 predictions:
#
'res' # prob  0.069489665329
'next'
'req'
'user'
',req'
Yes! That was easy 🎉 Let's try with another example
JS_CODE_= """
function getKeys(obj) {
  keys = [];
  for (var [key, value] of Object.entries(obj)) {
     keys.push(<mask>);
  }
  return keys
}
""".lstrip()

Results:

'obj', 'key', ' value', 'keys', 'i'

Not so bad! Right token was predicted as second option! 🎉

This work is heavely inspired on codeBERTa by huggingface team

CodeSearchNet citation
@article{husain_codesearchnet_2019,
\ttitle = {{CodeSearchNet} {Challenge}: {Evaluating} the {State} of {Semantic} {Code} {Search}},
\tshorttitle = {{CodeSearchNet} {Challenge}},
\turl = {http://arxiv.org/abs/1909.09436},
\turldate = {2020-03-12},
\tjournal = {arXiv:1909.09436 [cs, stat]},
\tauthor = {Husain, Hamel and Wu, Ho-Hsiang and Gazit, Tiferet and Allamanis, Miltiadis and Brockschmidt, Marc},
\tmonth = sep,
\tyear = {2019},
\tnote = {arXiv: 1909.09436},
}

Created by Manuel Romero/@mrm8488

Made with ♥ in Spain

Runs of mrm8488 codeBERTaJS on huggingface.co

53
Total runs
6
24-hour runs
6
3-day runs
13
7-day runs
33
30-day runs

More Information About codeBERTaJS huggingface.co Model

codeBERTaJS huggingface.co

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

codeBERTaJS huggingface.co Url

https://huggingface.co/mrm8488/codeBERTaJS

mrm8488 codeBERTaJS online free

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

mrm8488 codeBERTaJS online free url in huggingface.co:

https://huggingface.co/mrm8488/codeBERTaJS

codeBERTaJS install

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

codeBERTaJS install url in huggingface.co:

https://huggingface.co/mrm8488/codeBERTaJS

Url of codeBERTaJS

codeBERTaJS huggingface.co Url

Provider of codeBERTaJS huggingface.co

mrm8488
ORGANIZATIONS

Other API from mrm8488

huggingface.co

Total runs: 855
Run Growth: 264
Growth Rate: 30.88%
Updated:February 23 2024
huggingface.co

Total runs: 793
Run Growth: 592
Growth Rate: 74.65%
Updated:March 19 2023
huggingface.co

Total runs: 101
Run Growth: 48
Growth Rate: 48.00%
Updated:June 20 2023
huggingface.co

Total runs: 72
Run Growth: 32
Growth Rate: 44.44%
Updated:January 24 2024