Run this model with HF Jobs

Run qhduan/aquila-7b 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/qhduan/aquila-7b. 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/qhduan/aquila-7b 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/qhduan/aquila-7b. 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/qhduan/aquila-7b. 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.

https://github.com/FlagAI-Open/FlagAI/tree/master/examples/Aquila

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained('qhduan/aquila-7b')
model = AutoModelForCausalLM.from_pretrained('qhduan/aquila-7b', trust_remote_code=True)
model = model.eval().half().cuda()
prompt = '北京在哪儿?'
with torch.no_grad():
    ret = model.generate(
        **tokenizer(prompt, return_tensors='pt').to('cuda'),
        do_sample=False,
        max_new_tokens=200,
        use_cache=True
    )
# 北京在哪儿? 北京是中国的首都,是中华人民共和国的首都,是全国政治、经济、文化、交通中心,是世界著名古都和现代化国际城市
print(tokenizer.decode(ret[0]))

Aquila-7B和Aquila-33B开源模型使用 智源Aquila系列模型许可协议, 原始代码基于Apache Licence 2.0。

Downloads last month
71
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support