Text Generation
Transformers
Safetensors
phi3
phi
annihilate-llm
conversational
text-generation-inference
Instructions to use tjcrims0n/p5-ann with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tjcrims0n/p5-ann with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tjcrims0n/p5-ann") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tjcrims0n/p5-ann") model = AutoModelForCausalLM.from_pretrained("tjcrims0n/p5-ann") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tjcrims0n/p5-ann with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tjcrims0n/p5-ann" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tjcrims0n/p5-ann", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tjcrims0n/p5-ann
- SGLang
How to use tjcrims0n/p5-ann 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 "tjcrims0n/p5-ann" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tjcrims0n/p5-ann", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "tjcrims0n/p5-ann" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tjcrims0n/p5-ann", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tjcrims0n/p5-ann with Docker Model Runner:
docker model run hf.co/tjcrims0n/p5-ann
p5-ann
Full Transformers safetensors model based on microsoft/Phi-4-mini-instruct.
Notes
- This repo is a merged full model export, not an adapter-only repo.
annihilate_merge_metadata.jsonrecords the source adapter and merge details.- The repo intentionally uses the built-in Transformers Phi3/Phi loader path. Stale custom remote-code files were removed so
trust_remote_code=TrueandFalseboth resolve to the built-in loader. - Generation should stop on
<|end|>/<|endoftext|>;generation_config.jsoncontains both stop IDs.
Quick Load
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "tjcrims0n/p5-ann"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, device_map="auto")
messages = [
{"role": "system", "content": "Answer directly and concisely."},
{"role": "user", "content": "Hello."},
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(model.device)
outputs = model.generate(
inputs,
max_new_tokens=80,
eos_token_id=model.generation_config.eos_token_id,
pad_token_id=model.generation_config.pad_token_id,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Smoke Test Notes
Local verification passed for greeting, arithmetic, and code prompts after removing stale remote-code hooks from config.json.
- Downloads last month
- 48
Model tree for tjcrims0n/p5-ann
Base model
microsoft/Phi-4-mini-instruct