Instructions to use tensoropera/Fox-1-1.6B-Instruct-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tensoropera/Fox-1-1.6B-Instruct-v0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tensoropera/Fox-1-1.6B-Instruct-v0.1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tensoropera/Fox-1-1.6B-Instruct-v0.1") model = AutoModelForCausalLM.from_pretrained("tensoropera/Fox-1-1.6B-Instruct-v0.1") 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 tensoropera/Fox-1-1.6B-Instruct-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensoropera/Fox-1-1.6B-Instruct-v0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tensoropera/Fox-1-1.6B-Instruct-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tensoropera/Fox-1-1.6B-Instruct-v0.1
- SGLang
How to use tensoropera/Fox-1-1.6B-Instruct-v0.1 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 "tensoropera/Fox-1-1.6B-Instruct-v0.1" \ --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": "tensoropera/Fox-1-1.6B-Instruct-v0.1", "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 "tensoropera/Fox-1-1.6B-Instruct-v0.1" \ --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": "tensoropera/Fox-1-1.6B-Instruct-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tensoropera/Fox-1-1.6B-Instruct-v0.1 with Docker Model Runner:
docker model run hf.co/tensoropera/Fox-1-1.6B-Instruct-v0.1
Model Card for Fox-1-1.6B-Instruct
This model is an instruction tuned model which requires alignment before it can be used in production. We will release the chat version soon.
Fox-1 is a decoder-only transformer-based small language model (SLM) with 1.6B total parameters developed by TensorOpera AI. The model was pre-trained with a 3-stage data curriculum on 3 trillion tokens of text and code data in 8K sequence length. Fox-1 uses Grouped Query Attention (GQA) with 4 key-value heads and 16 attention heads for faster inference.
Fox-1-Instruct-v0.1 is an instruction-tuned (SFT) version of Fox-1-1.6B that has an 8K native context length. The model was finetuned with 5B tokens of instruction following and multi-turn conversation data.
For the full details of this model please read Fox-1 technical report and release blog post.
Getting-Started
The model and a live inference endpoint are available on the TensorOpera AI Platform.
For detailed deployment instructions, refer to the Step-by-Step Guide on how to deploy Fox-1-Instruct on the TensorOpera AI Platform.
Benchmarks
We evaluated Fox-1 on ARC Challenge (25-shot), HellaSwag (10-shot), TruthfulQA (0-shot), MMLU (5-shot), Winogrande (5-shot), and GSM8k (5-shot). We follow the Open LLM Leaderboard's evaluation setup and report the average score of the 6 benchmarks. The model was evaluated on a machine with 8*H100 GPUs.
| Fox-1-1.6B-Instruct-v0.1 | Fox-1-1.6B | Qwen1.5-1.8B-Chat | Gemma-2B-It | OpenELM-1.1B-Instruct | |
|---|---|---|---|---|---|
| GSM8k | 39.20% | 36.39% | 18.20% | 4.47% | 0.91% |
| MMLU | 44.99% | 43.05% | 45.77% | 37.70% | 25.70% |
| ARC Challenge | 43.60% | 41.21% | 38.99% | 43.34% | 40.36% |
| HellaSwag | 63.39% | 62.82% | 60.31% | 62.72% | 71.67% |
| TruthfulQA | 44.12% | 38.66% | 40.57% | 45.86% | 45.96% |
| Winogrande | 62.67% | 60.62% | 59.51% | 61.33% | 61.96% |
| Average | 49.66% | 47.13% | 43.89% | 42.57% | 41.09% |
- Downloads last month
- 74