Run this model with HF Jobs

Run microsoft/phi-1 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/microsoft/phi-1. 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/microsoft/phi-1 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/microsoft/phi-1. 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/microsoft/phi-1. 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.
phi-1 / modeling_phi.py

Commit History

  1. Update modeling_phi.py

    Verified signature
    944a013

  1. Update modeling_phi.py

    Verified signature
    03b9f69
  2. Update modeling_phi.py

    Verified signature
    54bed1a

  1. Update modeling_phi.py

    Verified signature
    50bb267

  1. Upload modeling_phi.py

    2cfa65f

  1. Update modeling_phi.py

    e575241

  1. Update modeling_phi.py

    4e6ed66
  2. fix(root): Fixes relative paths.

    b908838
  3. chore(root): Updates files to internal transformers implementation.

    8a2c68b

  1. fix(modeling_phi): Fixes initial generation with length larger than context length.

    f4e55a8

  1. fix(modeling_phi): Fixes cached generation when above maximum context length.

    ecfe56e

  1. Fixes exceeding maximum sequence length when using generate().

    759d148

  1. Uses native torch decorator for disabling autocast.

    5819d04
  2. Adds disable_autocast support for different device types.

    67ecc75
  3. Fixes any potential overflow when calculating attention weights.

    b5c5161

  1. Update to new model interface.

    bbace88