Text Generation
Transformers
Safetensors
GGUF
phi3
conversational
custom_code
text-generation-inference
Run this model with HF Jobs
Run SciPhi/Triplex 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/SciPhi/Triplex. 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/SciPhi/Triplex 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/SciPhi/Triplex. 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/SciPhi/Triplex. 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 SciPhi/Triplex with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SciPhi/Triplex with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SciPhi/Triplex", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SciPhi/Triplex", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("SciPhi/Triplex", trust_remote_code=True, device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SciPhi/Triplex with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf SciPhi/Triplex:Q4_K_M # Run inference directly in the terminal: llama cli -hf SciPhi/Triplex:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf SciPhi/Triplex:Q4_K_M # Run inference directly in the terminal: llama cli -hf SciPhi/Triplex:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf SciPhi/Triplex:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf SciPhi/Triplex:Q4_K_M
Use Docker
docker model run hf.co/SciPhi/Triplex:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use SciPhi/Triplex with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SciPhi/Triplex" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SciPhi/Triplex", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SciPhi/Triplex:Q4_K_M
- SGLang
How to use SciPhi/Triplex 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 "SciPhi/Triplex" \ --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": "SciPhi/Triplex", "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 "SciPhi/Triplex" \ --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": "SciPhi/Triplex", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use SciPhi/Triplex with Ollama:
ollama run hf.co/SciPhi/Triplex:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use SciPhi/Triplex with Docker Model Runner:
docker model run hf.co/SciPhi/Triplex:Q4_K_M
- Lemonade
How to use SciPhi/Triplex with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SciPhi/Triplex:Q4_K_M
Run and chat with the model
lemonade run user.Triplex-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Update config.json
Browse files2 unmodified lines345678910111213142 unmodified lines171819202122232 unmodified lines26272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381392 unmodified lines"architectures": ["Phi3ForCausalLM"],"attention_bias": false,"attention_dropout": 0.0,"auto_map": {"AutoConfig": "microsoft/Phi-3-mini-128k-instruct--configuration_phi3.Phi3Config","AutoModel": "microsoft/Phi-3-mini-128k-instruct--modeling_phi3.Phi3ForCausalLM","AutoModelForCausalLM": "microsoft/Phi-3-mini-128k-instruct--modeling_phi3.Phi3ForCausalLM"},"bos_token_id": 1,"embd_pdrop": 0.0,2 unmodified lines"hidden_size": 3072,"initializer_range": 0.02,"intermediate_size": 8192,"max_position_embeddings": 131072,"model_type": "phi3","num_attention_heads": 32,"num_hidden_layers": 32,2 unmodified lines"pad_token_id": 32000,"resid_pdrop": 0.0,"rms_norm_eps": 1e-05,"rope_scaling": {"long_factor": [1.0700000524520874,1.1200000047683716,1.149999976158142,1.4199999570846558,1.5699999332427979,1.7999999523162842,2.129999876022339,2.129999876022339,3.009999990463257,5.910000324249268,6.950000286102295,9.070000648498535,9.930000305175781,10.710000038146973,11.130000114440918,14.609999656677246,15.409998893737793,19.809999465942383,37.279998779296875,38.279998779296875,38.599998474121094,40.12000274658203,46.20000457763672,50.940006256103516,53.66000747680664,54.9373893737793,56.89738845825195,57.28738784790039,59.98738479614258,60.86738586425781,60.887386322021484,61.71739196777344,62.91739273071289,62.957393646240234,63.41739273071289,63.8173942565918,63.83739471435547,63.897396087646484,63.93739700317383,64.06739807128906,64.11434936523438,64.12435150146484,64.15435028076172,64.19435119628906,64.24435424804688,64.57435607910156,64.69000244140625,64.76000213623047],"short_factor": [1.1,1.1,1.1,1.3000000000000003,1.3500000000000003,1.3500000000000003,1.4000000000000004,1.5500000000000005,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.000000000000001,2.0500000000000007,2.0500000000000007,2.0500000000000007,2.0500000000000007,2.0500000000000007,2.0500000000000007,2.1000000000000005,2.1000000000000005,2.1500000000000004,2.25,2.25,2.25,2.25,2.25,2.3999999999999995,2.4499999999999993,2.499999999999999,2.6999999999999984,2.6999999999999984,2.7499999999999982,2.799999999999998,2.8999999999999977,3.049999999999997],"type": "yarn"},"rope_theta": 10000.0,"sliding_window": 262144,"tie_word_embeddings": false,"torch_dtype": "bfloat16","transformers_version": "4.42.3","use_cache": false,"vocab_size": 32064}2 unmodified lines34567891011122 unmodified lines151617181920212 unmodified lines242526272829303132333435362 unmodified lines"architectures": ["Phi3ForCausalLM"],"attention_dropout": 0.0,"auto_map": {"AutoConfig": "configuration_phi3.Phi3Config","AutoModelForCausalLM": "modeling_phi3.Phi3ForCausalLM"},"bos_token_id": 1,"embd_pdrop": 0.0,2 unmodified lines"hidden_size": 3072,"initializer_range": 0.02,"intermediate_size": 8192,"max_position_embeddings": 4096,"model_type": "phi3","num_attention_heads": 32,"num_hidden_layers": 32,2 unmodified lines"pad_token_id": 32000,"resid_pdrop": 0.0,"rms_norm_eps": 1e-05,"rope_scaling": null,"rope_theta": 10000.0,"sliding_window": 2047,"tie_word_embeddings": false,"torch_dtype": "bfloat16","transformers_version": "4.40.2","use_cache": true,"attention_bias": false,"vocab_size": 32064}
config.json+8-111