Run this model with HF Jobs

Run Aleph-Alpha/Pharia-1-LLM-7B-control-hf 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/Aleph-Alpha/Pharia-1-LLM-7B-control-hf. 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/Aleph-Alpha/Pharia-1-LLM-7B-control-hf 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/Aleph-Alpha/Pharia-1-LLM-7B-control-hf. 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/Aleph-Alpha/Pharia-1-LLM-7B-control-hf. 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.

This is the safetensors-conversion of Pharia-1-LLM-7B-control. We provide a joint model card for Pharia-1-LLM-7B-control and Pharia-1-LLM-control-aligned. Find this model card here.

Usage

import torch

from transformers import AutoModelForCausalLM, PreTrainedTokenizerFast


INPUT = """<|begin_of_text|><|start_header_id|>system<|end_header_id|>

You are a helpful assistant. You give engaging, well-structured answers to user inquiries.<|eot_id|><|start_header_id|>user<|end_header_id|>

When was Rome founded?<|eot_id|><|start_header_id|>assistant<|end_header_id|>


"""

MODEL_ID = "Aleph-Alpha/Pharia-1-LLM-7B-control-hf"

tokenizer = PreTrainedTokenizerFast.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(MODEL_ID, trust_remote_code=True, torch_dtype=torch.bfloat16)

device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model = model.to(device)

inputs = tokenizer(INPUT, return_token_type_ids=False, return_tensors="pt").to(device)
outputs = model.generate(**inputs, max_new_tokens=50)
generated_text = tokenizer.decode(outputs[0])
print(generated_text)
Downloads last month
334
Safetensors
Model size
7B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Spaces using Aleph-Alpha/Pharia-1-LLM-7B-control-hf 2