Text Generation
PEFT
Chinese
bloom

Run this model with HF Jobs

Run Rorical/bloom-7b1-lightnovel-lora 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 to fine-tune https://huggingface.co/Rorical/bloom-7b1-lightnovel-lora. 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/Rorical/bloom-7b1-lightnovel-lora 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/Rorical/bloom-7b1-lightnovel-lora. 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/Rorical/bloom-7b1-lightnovel-lora. 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 7B1 LightNovel ZH_CN LoRa Finetuned

BigScience Large Open-science Open-access Multilingual Language Model with 7,1 billion parameters finetuned on Chinese Translation of Japanese LightNovel using LoRa from PEFT (?)

Model Details

I just downloaded 50 LightNovels then finetuned the model on raw text.

Trained by Rorical

Use

import torch
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM, AutoTokenizer

peft_model_id = "Rorical/bloom-7b1-lightnovel-lora"
config = PeftConfig.from_pretrained(peft_model_id)
model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, return_dict=True, load_in_8bit=True, device_map='auto', cache_dir="cache")
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path, cache_dir="cache")
model = PeftModel.from_pretrained(model, peft_model_id, cache_dir="cache")

prompt = "你是谁?\n"
batch = tokenizer(prompt, return_tensors='pt').to("cuda")

with torch.cuda.amp.autocast():
    output_tokens = model.generate(**batch, max_new_tokens=150, do_sample=True, top_k=50, top_p=0.95)

print(tokenizer.decode(output_tokens[0], skip_special_tokens=True))
Downloads last month
7
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support