Run this model with HF Jobs

Run mrm8488/bloom-560m-finetuned-the-stack-rust on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/mrm8488/bloom-560m-finetuned-the-stack-rust. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/mrm8488/bloom-560m-finetuned-the-stack-rust on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/mrm8488/bloom-560m-finetuned-the-stack-rust. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/mrm8488/bloom-560m-finetuned-the-stack-rust. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

BLOOM (560M ckpt) fine-tuned on The Stack RUST code

Model 🧠

BigScience Large Open-science Open-access Multilingual Language Model 🌸

BLOOM is an autoregressive Large Language Model (LLM), trained to continue text from a prompt on vast amounts of text data using industrial-scale computational resources. As such, it is able to output coherent text in 46 languages and 13 programming languages that is hardly distinguishable from text written by humans. BLOOM can also be instructed to perform text tasks it hasn't been explicitly trained for, by casting them as text generation tasks.

Dataset πŸ“š

Rust πŸ¦€ part of The Stack.

The Stack contains over 6TB of permissively-licensed source code files covering 358 programming languages. The dataset was created as part of the BigCode Project, an open scientific collaboration working on the responsible development of Large Language Models for Code (Code LLMs). The Stack serves as a pre-training dataset for Code LLMs, i.e., code-generating AI systems which enable the synthesis of programs from natural language descriptions as well as other from code snippets.

Example of usage πŸ‘©β€πŸ’»

import torch
from transformers import BloomTokenizerFast, BloomForCausalLM

device = 'cuda' if torch.cuda.is_available() else 'cpu'
ckpt = 'mrm8488/bloom-560m-finetuned-the-stack-rust'
revision = '100k' # latest one at the moment 

tokenizer = BloomTokenizerFast.from_pretrained(ckpt)
model = BloomForCausalLM.from_pretrained(ckpt, revision=revision).to(device)

def complete_code(text):
    inputs = tokenizer(text, return_tensors='pt')
    input_ids = inputs.input_ids.to(device)
    attention_mask = inputs.attention_mask.to(device)
    output = model.generate(input_ids, attention_mask=attention_mask, max_length=2048, eos_token_id=tokenizer.eos_token_id)

    return tokenizer.decode(output[0], skip_special_tokens=False)
    
code_prompt = """
use fastly::{Error, Request, Response};
use serde_json::{json, Value};

#[fastly::main]
fn main(req: Request) -> Result<Response, Error> {
  let mut response = req.send("origin_0")?;
"""

complete_code(code_prompt)

Citation βœ’οΈ

@misc {manuel_romero_2022,
    author       = { {Manuel Romero} },
    title        = { bloom-560m-finetuned-the-stack-rust (Revision 5358462) },
    year         = 2022,
    url          = { https://huggingface.co/mrm8488/bloom-560m-finetuned-the-stack-rust },
    doi          = { 10.57967/hf/0236 },
    publisher    = { Hugging Face }
}
Downloads last month
222
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support