Instructions to use Ionio-ai/ZeproSolar-2x7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ionio-ai/ZeproSolar-2x7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ionio-ai/ZeproSolar-2x7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ionio-ai/ZeproSolar-2x7B") model = AutoModelForCausalLM.from_pretrained("Ionio-ai/ZeproSolar-2x7B") 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 Ionio-ai/ZeproSolar-2x7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ionio-ai/ZeproSolar-2x7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ionio-ai/ZeproSolar-2x7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ionio-ai/ZeproSolar-2x7B
- SGLang
How to use Ionio-ai/ZeproSolar-2x7B 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 "Ionio-ai/ZeproSolar-2x7B" \ --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": "Ionio-ai/ZeproSolar-2x7B", "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 "Ionio-ai/ZeproSolar-2x7B" \ --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": "Ionio-ai/ZeproSolar-2x7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Ionio-ai/ZeproSolar-2x7B with Docker Model Runner:
docker model run hf.co/Ionio-ai/ZeproSolar-2x7B
Model Card for ZeproSolar-2x7B
ZeproSolar-2x7B was created using the MergeKit library, designed for text generation tasks, particularly in conversational contexts.
Model Description
This model is a combination(MoE) of HuggingFaceH4/zephyr-7b-alpha and NousResearch/Nous-Hermes-2-SOLAR-10.7. It is intended to offer a high-quality, responsive, and adaptable assistant experience.
Model Sources
HuggingFaceH4/zephyr-7b-alpha: A model focused on text generation, transformers, and conversational tasks. It is part of the Zephyr 7B collection, which includes models, datasets, and demos associated with Zephyr 7B. NousResearch/Nous-Hermes-2-SOLAR-10.7B: A model known for its capabilities in text generation, with a focus on AWQ (Adaptive Weight Quantization) and compatibility with various inference servers and platforms.
Intended Uses & Limitations
This model is designed for a wide range of conversational and text generation tasks, making it suitable for applications such as chatbots, virtual assistants, and content generation. However, like all models, it has limitations, including potential biases in the training data and the need for careful handling of sensitive information.
Bias, Risks, and Limitations
As with any model, there may be biases present in the training data, which could affect the model's outputs. Users are advised to use the model responsibly and to be aware of potential risks, including the generation of misleading or harmful content.
How to Use
To use this model, you can download it from the Hugging Face Model Hub and use it with the Hugging Face Transformers library. The model is compatible with Python and can be easily integrated into various applications and platforms.
# Install transformers from source - only needed for versions <= v4.34
# pip install git+https://github.com/huggingface/transformers.git
# pip install accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM
# Specify the model name
model_name = "Ionio-ai/ZeproSolar-2x7B"
# Load the model and tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# Encode the input text
input_text = "This is a test input."
input_ids = tokenizer.encode(input_text, return_tensors="pt")
# Generate the output text
output = model.generate(input_ids, max_length=50)
# Decode the output text
output_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(output_text)
- Downloads last month
- 5
