Instructions to use openvoid/Prox-Phi-3-mini-128k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openvoid/Prox-Phi-3-mini-128k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openvoid/Prox-Phi-3-mini-128k", 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("openvoid/Prox-Phi-3-mini-128k", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("openvoid/Prox-Phi-3-mini-128k", 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 openvoid/Prox-Phi-3-mini-128k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openvoid/Prox-Phi-3-mini-128k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openvoid/Prox-Phi-3-mini-128k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/openvoid/Prox-Phi-3-mini-128k
- SGLang
How to use openvoid/Prox-Phi-3-mini-128k 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 "openvoid/Prox-Phi-3-mini-128k" \ --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": "openvoid/Prox-Phi-3-mini-128k", "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 "openvoid/Prox-Phi-3-mini-128k" \ --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": "openvoid/Prox-Phi-3-mini-128k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use openvoid/Prox-Phi-3-mini-128k with Docker Model Runner:
docker model run hf.co/openvoid/Prox-Phi-3-mini-128k
Prox-Phi-3-mini-128k
By OpenVoid
Model Description
Prox-Phi-3-mini-128k is a fine-tuned version of Microsoft's Phi-3-mini-128k architecture, tailored for specialized applications in code generation and cybersecurity. This model, with 3.8 billion parameters, provides efficient deployment and robust performance, making it well-suited for tasks such as hacking simulations and vulnerability analysis.
Intended Uses & Limitations
Designed for tasks related to hacking and coding:
- Code generation
- Code explanation and documentation
- Answering questions on hacking techniques and cybersecurity
- Providing coding project insights
Review and verify outputs carefully, especially for critical applications. Expert validation is recommended to avoid biased or inconsistent content. Use responsibly and ethically, complying with applicable laws and regulations to prevent misuse for malicious purposes.
Training Data
The model was fine-tuned on a proprietary dataset from OpenVoid, featuring high-quality text data related to coding, cybersecurity, and hacking. Extensive filtering and preprocessing ensured data quality and relevance.
Evaluation
- HumanEval v1.0: pass@1: 0.573
- EvalPlus v1.1: pass@1: 0.555
- MBPP: pass@1: 0.659
- MBPP+: pass@1: 0.556
How to Use the Model
Using Transformers
Example of using Prox-Phi-3-mini-128k with the Transformers library:
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
model_id = "openvoid/Prox-Phi-3-mini-128k"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", trust_remote_code=True)
pipe = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
)
generation_args = {
"max_new_tokens": 500,
"return_full_text": False,
"temperature": 0.0,
"do_sample": False,
}
input_text = "You are a helpful AI assistant. Can you introduce yourself?"
output = pipe(input_text, **generation_args)
print(output[0]['generated_text'])
- Downloads last month
- 7