Instructions to use frameai/Loxa-1.6B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use frameai/Loxa-1.6B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="frameai/Loxa-1.6B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("frameai/Loxa-1.6B") model = AutoModelForCausalLM.from_pretrained("frameai/Loxa-1.6B") 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 frameai/Loxa-1.6B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "frameai/Loxa-1.6B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "frameai/Loxa-1.6B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/frameai/Loxa-1.6B
- SGLang
How to use frameai/Loxa-1.6B 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 "frameai/Loxa-1.6B" \ --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": "frameai/Loxa-1.6B", "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 "frameai/Loxa-1.6B" \ --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": "frameai/Loxa-1.6B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use frameai/Loxa-1.6B with Docker Model Runner:
docker model run hf.co/frameai/Loxa-1.6B
Loxa-1.6B: A High-Quality Conversational AI Model
Loxa-1.6B is a state-of-the-art conversational AI model designed to generate high-quality, human-like text with exceptional accuracy. It is trained on a massive dataset with an emphasis on high-quality text and improved English language understanding. This README provides an overview of the model's features, capabilities, usage instructions, and other essential information.
Key Features
- High-Quality Text Generation: Loxa-1.6B excels at generating fluent, coherent, and contextually relevant text that closely resembles human writing.
- Improved English Proficiency: The model has been meticulously trained to understand and generate text with a strong command of the English language, including grammar, syntax, and vocabulary.
- Conversational AI: Loxa-1.6B is specifically designed for conversational applications, making it ideal for chatbots, virtual assistants, and other interactive AI systems.
- Efficient Performance: The model can operate efficiently on both CPUs and GPUs, offering flexibility in deployment across various hardware configurations.
- High Accuracy: Loxa-1.6B achieves an impressive 89% accuracy in text generation, ensuring reliable and consistent performance.
- Advanced Architecture: Built on a cutting-edge model architecture, Loxa-1.6B leverages the latest advancements in deep learning and natural language processing.
Model Capabilities
Loxa-1.6B can perform a wide range of language-based tasks, including:
- Engaging in natural conversations: The model can participate in meaningful dialogues, respond appropriately to user queries, and maintain context throughout the interaction.
- Generating creative content: Loxa-1.6B can create various forms of written content, such as stories, articles, poems, and scripts.
- Answering questions: The model can provide accurate and informative answers to a wide range of questions based on its extensive knowledge base.
- Summarizing text: Loxa-1.6B can condense large volumes of text into concise and informative summaries.
- Translating languages: Although primarily focused on English, the model has some capability to translate between English and other languages.
Usage
This section provides a brief overview of how to use Loxa-1.6B.
Installation
To use Loxa-1.6B, you need to have a suitable environment with the required dependencies installed. This typically includes:
- Python: A recent version of Python (e.g., Python 3.8 or later) is recommended.
- Deep Learning Framework: A framework like TensorFlow or PyTorch is required to load and run the model.
- Model Files: Download the pre-trained model weights and configuration files from this repo.
Example Code (Python with Hugging Face Transformers)
from transformers import pipeline
# Load the Loxa-1.6B model and tokenizer
generator = pipeline("text-generation", model="frameai/Loxa-1.6B") # Replace with the actual path
# Generate text
prompt = "What are the benefits of using AI in education?"
output = generator(prompt, max_length=8192)
# Print the generated text
print(output[0]['generated_text'])
- Downloads last month
- 3