Text Generation
Transformers.js
PyTorch
ONNX
Transformers
falcon
custom_code
text-generation-inference
Instructions to use Xenova/really-tiny-falcon-testing with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Xenova/really-tiny-falcon-testing with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'Xenova/really-tiny-falcon-testing'); - Transformers
How to use Xenova/really-tiny-falcon-testing with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Xenova/really-tiny-falcon-testing", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Xenova/really-tiny-falcon-testing", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("Xenova/really-tiny-falcon-testing", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Xenova/really-tiny-falcon-testing with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Xenova/really-tiny-falcon-testing" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Xenova/really-tiny-falcon-testing", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Xenova/really-tiny-falcon-testing
- SGLang
How to use Xenova/really-tiny-falcon-testing 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 "Xenova/really-tiny-falcon-testing" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Xenova/really-tiny-falcon-testing", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Xenova/really-tiny-falcon-testing" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Xenova/really-tiny-falcon-testing", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Xenova/really-tiny-falcon-testing with Docker Model Runner:
docker model run hf.co/Xenova/really-tiny-falcon-testing
| { | |
| "per_channel": false, | |
| "reduce_range": false, | |
| "per_model_config": { | |
| "model": { | |
| "op_types": [ | |
| "Where", | |
| "MatMul", | |
| "Equal", | |
| "Or", | |
| "Identity", | |
| "Reshape", | |
| "Neg", | |
| "Sin", | |
| "Erf", | |
| "Sqrt", | |
| "Squeeze", | |
| "Div", | |
| "Pow", | |
| "Slice", | |
| "Range", | |
| "Transpose", | |
| "Tile", | |
| "Softmax", | |
| "Einsum", | |
| "Constant", | |
| "Not", | |
| "Add", | |
| "Unsqueeze", | |
| "Cos", | |
| "Cast", | |
| "Concat", | |
| "ConstantOfShape", | |
| "Mul", | |
| "Gather", | |
| "ScatterND", | |
| "Sub", | |
| "Expand", | |
| "ReduceMean", | |
| "Shape", | |
| "Less" | |
| ], | |
| "weight_type": "QInt8" | |
| } | |
| } | |
| } |