Text Generation
Transformers
Diffusers
Safetensors
English
gpt_oss
phillnet-2
gpt-oss
multimodal
image-generation
video-generation
speech
audio
custom-code
conversational
custom_code
Instructions to use ayjays132/Phillnet-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ayjays132/Phillnet-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ayjays132/Phillnet-2", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ayjays132/Phillnet-2", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("ayjays132/Phillnet-2", trust_remote_code=True) 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
- vLLM
How to use ayjays132/Phillnet-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ayjays132/Phillnet-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ayjays132/Phillnet-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ayjays132/Phillnet-2
- SGLang
How to use ayjays132/Phillnet-2 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 "ayjays132/Phillnet-2" \ --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": "ayjays132/Phillnet-2", "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 "ayjays132/Phillnet-2" \ --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": "ayjays132/Phillnet-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ayjays132/Phillnet-2 with Docker Model Runner:
docker model run hf.co/ayjays132/Phillnet-2
| { | |
| "conditioning_dim": 768, | |
| "max_condition_tokens": 256, | |
| "prefer_hidden_layer": -1, | |
| "use_native_embeddings": true, | |
| "norm_style": "rms_layer_adaptive", | |
| "enable_memory": true, | |
| "enable_steering": true, | |
| "memory_capacity": 128, | |
| "memory_top_k": 4, | |
| "memory_strength": 0.25, | |
| "use_high_fidelity_text_bridge": true, | |
| "bridge_dim": 768, | |
| "bridge_hidden_mult": 4, | |
| "bridge_gate_init": 0.0, | |
| "use_sdxl_conditioning_projector": true, | |
| "sdxl_token_dim": 2048, | |
| "sdxl_pooled_dim": 1280, | |
| "image_generator_class": "LightweightLatentImageGenerator", | |
| "image_generator_config": { | |
| "cond_dim": 768, | |
| "latent_channels": 4, | |
| "base_channels": 256, | |
| "diffusion_steps": 1000, | |
| "use_multiscale_refiner": true, | |
| "use_highfreq_head": true, | |
| "decoder_res_blocks": 0, | |
| "refiner_channels": 128, | |
| "use_attention_refiner": false, | |
| "generation_mode": "latent_diffusion", | |
| "vae_model_name_or_path": "models/Phillnet-2-SDXL-UNet-VAE", | |
| "vae_scale_factor": 0.13025, | |
| "decode_latents_on_generate": true, | |
| "latent_diffusion_channels": 256, | |
| "latent_diffusion_blocks": 2, | |
| "latent_diffusion_attention": false, | |
| "num_train_timesteps": 1000, | |
| "prediction_type": "epsilon", | |
| "default_inference_steps": 8, | |
| "denoiser_backbone": "multiscale_unet", | |
| "unet_base_channels": 192, | |
| "unet_res_blocks_per_stage": 2, | |
| "use_token_cross_attention": true, | |
| "cross_attention_heads": 8, | |
| "final_decode_mode": "unified", | |
| "final_rgb_blend": 0.35, | |
| "use_spatial_text_prior": true, | |
| "spatial_prior_hidden": 256, | |
| "spatial_prior_heads": 4, | |
| "spatial_prior_layers": 2, | |
| "spatial_prior_query_count": 256, | |
| "enable_quality_adapter": true, | |
| "quality_adapter_hidden": 64, | |
| "enable_visual_contract_adapter": true, | |
| "visual_contract_hidden": 64, | |
| "visual_contract_maps": 8, | |
| "enable_refiner_lora": true, | |
| "refiner_lora_rank": 16, | |
| "refiner_lora_hidden": 32, | |
| "enable_latent_refiner": true, | |
| "latent_refiner_hidden": 128, | |
| "enable_structure_prior": true, | |
| "structure_prior_hidden": 192, | |
| "structure_prior_seed_size": 16, | |
| "structure_prior_heads": 4, | |
| "use_pretrained_unet": true, | |
| "pretrained_unet_model_name_or_path": "models/Phillnet-2-SDXL-UNet-VAE" | |
| }, | |
| "aligner_input_dims": [ | |
| 768, | |
| 1024 | |
| ], | |
| "use_qwen_text_refiner": true, | |
| "qwen_refiner_hidden": 1024, | |
| "qwen_refiner_intermediate": 3584, | |
| "qwen_refiner_layers": 16, | |
| "qwen_refiner_attention_indices": [ | |
| 3, | |
| 7, | |
| 11, | |
| 15 | |
| ], | |
| "qwen_refiner_weights": "models/qwen_aligned_refiner/deep_16.pt", | |
| "text_tokenizer_dir": "tokenizer", | |
| "use_vision_encoder": false, | |
| "vision_hidden_size": 768, | |
| "vision_target_dim": 1024, | |
| "image_processor_dir": null | |
| } |