Instructions to use ozone-research/llama-3.1-0x-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ozone-research/llama-3.1-0x-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ozone-research/llama-3.1-0x-mini") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ozone-research/llama-3.1-0x-mini") model = AutoModelForCausalLM.from_pretrained("ozone-research/llama-3.1-0x-mini") 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 ozone-research/llama-3.1-0x-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ozone-research/llama-3.1-0x-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ozone-research/llama-3.1-0x-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ozone-research/llama-3.1-0x-mini
- SGLang
How to use ozone-research/llama-3.1-0x-mini 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 "ozone-research/llama-3.1-0x-mini" \ --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": "ozone-research/llama-3.1-0x-mini", "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 "ozone-research/llama-3.1-0x-mini" \ --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": "ozone-research/llama-3.1-0x-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ozone-research/llama-3.1-0x-mini with Docker Model Runner:
docker model run hf.co/ozone-research/llama-3.1-0x-mini
YAML Metadata Warning:The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
0x Mini
Overview
0x Mini is a state-of-the-art language model developed by Ozone AI, designed to deliver high-quality text generation capabilities while maintaining a compact and efficient architecture. Built on the latest advancements in natural language processing, 0x Mini is optimized for both speed and accuracy, making it a strong contender in the space of language models. It is particularly well-suited for applications where resource constraints are a concern, offering a lightweight alternative to larger models like GPT while still delivering comparable performance.
Features
- Compact and Efficient: 0x Mini is designed to be lightweight, making it suitable for deployment on resource-constrained devices.
- High-Quality Text Generation: The model is trained on a diverse dataset to generate coherent, contextually relevant, and human-like text.
- Versatile Applications: Suitable for tasks such as text completion, summarization, translation, and more.
- Fast Inference: Optimized for speed, ensuring quick and efficient responses.
- Open-Source and Community-Driven: Built with transparency and collaboration in mind, 0x Mini is available for the community to use, modify, and improve.
Use Cases
- Text Completion: Assist users with writing tasks by generating coherent and contextually appropriate text.
- Summarization: Summarize long documents into concise and meaningful summaries.
- Chatbots: Power conversational AI systems with 0x Mini.
- Content Creation: Generate creative content such as stories, poems, or marketing copy.
- Education: Assist students with research, essay writing, and language learning.
Getting Started
To get started with 0x Mini, follow these steps:
Install the Model:
pip install transformersLoad the Model:
from transformers import AutoModelForCausalLM, AutoTokenizer model_name = "ozone-ai/llama-3.1-0x-mini" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained(model_name)Generate Text:
input_text = "Once upon a time" inputs = tokenizer(input_text, return_tensors="pt").to("cuda") outputs = model.generate(**inputs, max_length=50) generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True) print(generated_text)
- Downloads last month
- 9