Run this model with HF Jobs
Run aegon-h/phi-base_model 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/aegon-h/phi-base_model. 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/aegon-h/phi-base_model 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/aegon-h/phi-base_model. 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/aegon-h/phi-base_model. 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.
Instructions to use aegon-h/phi-base_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aegon-h/phi-base_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aegon-h/phi-base_model", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("aegon-h/phi-base_model", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use aegon-h/phi-base_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aegon-h/phi-base_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aegon-h/phi-base_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aegon-h/phi-base_model
- SGLang
How to use aegon-h/phi-base_model with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "aegon-h/phi-base_model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aegon-h/phi-base_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "aegon-h/phi-base_model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aegon-h/phi-base_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use aegon-h/phi-base_model with Docker Model Runner:
docker model run hf.co/aegon-h/phi-base_model
Agon H commited on
Commit ·
fb7284c
1
Parent(s): 2f51b1e
Upload configuration_mixformer_sequential.py
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859# Copyright (c) Microsoft Corporation.# Licensed under the MIT license.
import mathfrom typing import Any, Dict, List, Optional, Union
from transformers import PretrainedConfig
class MixFormerSequentialConfig(PretrainedConfig): """MixFormer (sequential for DeepSpeed) configuration."""
model_type = "mixformer-sequential"
attribute_map = { "max_position_embeddings": "n_positions", "hidden_size": "n_embd", "num_attention_heads": "n_head", "num_hidden_layers": "n_layer", "input_emb_layer": "embd_layer", # `input_emb_layer` key is for backward compatibility "blocks": "architecture", # `blocks` key is for backward compatibility }
def __init__( self, vocab_size: Optional[int] = 50304, n_positions: Optional[int] = 2048, n_embd: Optional[int] = 1024, n_layer: Optional[int] = 20, n_inner: Optional[int] = None, n_head: Optional[int] = 16, rotary_dim: Optional[int] = 32, activation_function: Optional[str] = "gelu_new", embd_layer: Optional[str] = "default", architecture: Union[Dict[str, Any], List[Dict[str, Any]]] = None, embd_pdrop: Optional[float] = 0.0, resid_pdrop: Optional[float] = 0.0, layer_norm_epsilon: Optional[float] = 1e-5, initializer_range: Optional[float] = 0.02, tie_word_embeddings: Optional[bool] = False, pad_vocab_size_multiple: Optional[int] = 64, **kwargs ) -> None: self.vocab_size = int(math.ceil(vocab_size / pad_vocab_size_multiple) * pad_vocab_size_multiple) self.n_positions = n_positions self.n_embd = n_embd self.n_layer = n_layer self.n_inner = n_inner self.n_head = n_head self.rotary_dim = min(rotary_dim, n_embd // n_head) self.activation_function = activation_function self.embd_layer = embd_layer self.architecture = architecture self.embd_pdrop = embd_pdrop self.resid_pdrop = resid_pdrop self.layer_norm_epsilon = layer_norm_epsilon self.initializer_range = initializer_range
super().__init__(tie_word_embeddings=tie_word_embeddings, **kwargs)configuration_mixformer_sequential.pyAdded+59