Instructions to use optimum-intel-internal-testing/tiny-random-ouro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use optimum-intel-internal-testing/tiny-random-ouro with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="optimum-intel-internal-testing/tiny-random-ouro", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("optimum-intel-internal-testing/tiny-random-ouro", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use optimum-intel-internal-testing/tiny-random-ouro with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "optimum-intel-internal-testing/tiny-random-ouro" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "optimum-intel-internal-testing/tiny-random-ouro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/optimum-intel-internal-testing/tiny-random-ouro
- SGLang
How to use optimum-intel-internal-testing/tiny-random-ouro 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 "optimum-intel-internal-testing/tiny-random-ouro" \ --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": "optimum-intel-internal-testing/tiny-random-ouro", "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 "optimum-intel-internal-testing/tiny-random-ouro" \ --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": "optimum-intel-internal-testing/tiny-random-ouro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use optimum-intel-internal-testing/tiny-random-ouro with Docker Model Runner:
docker model run hf.co/optimum-intel-internal-testing/tiny-random-ouro
| library_name: transformers | |
| license: apache-2.0 | |
| # tiny-random-ouro | |
| Tiny random [Ouro](https://huggingface.co/ByteDance/Ouro-1.4B) model for `optimum-intel` OpenVINO CI. | |
| Architecture: `OuroForCausalLM` (Universal Transformer). Generated with random weights; the full | |
| `vocab_size` (49152) and the real tokenizer are kept so the tokenizer round-trips, while all other | |
| dimensions are shrunk. `total_ut_steps=4` is preserved to exercise the Universal-Transformer loop. | |
| | field | value | | |
| |-------|-------| | |
| | hidden_size | 32 | | |
| | intermediate_size | 64 | | |
| | num_hidden_layers | 2 | | |
| | num_attention_heads | 4 | | |
| | num_key_value_heads | 2 | | |
| | head_dim | 8 | | |
| | total_ut_steps | 4 | | |
| | vocab_size | 49152 | | |
| Reproduce with the script in the optimum-intel PR description. | |