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) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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
Update config.json
Browse files- config.json +6 -10
config.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
| 7 |
],
|
| 8 |
"attention_dropout": 0.0,
|
| 9 |
"auto_map": {
|
| 10 |
-
"AutoConfig": "
|
| 11 |
-
"AutoModel": "
|
| 12 |
-
"
|
| 13 |
-
"
|
| 14 |
-
"
|
| 15 |
-
"
|
| 16 |
},
|
| 17 |
"bias": false,
|
| 18 |
"bos_token_id": 11,
|
|
@@ -25,13 +25,9 @@
|
|
| 25 |
"model_type": "falcon",
|
| 26 |
"multi_query": true,
|
| 27 |
"new_decoder_architecture": false,
|
| 28 |
-
"nm_kv_hears": 2,
|
| 29 |
"num_attention_heads": 2,
|
| 30 |
"num_hidden_layers": 2,
|
| 31 |
-
"num_kv_heads": 71,
|
| 32 |
"parallel_attn": true,
|
| 33 |
-
"rope_scaling": null,
|
| 34 |
-
"rope_theta": 10000.0,
|
| 35 |
"transformers_version": "4.34.1",
|
| 36 |
"use_cache": true,
|
| 37 |
"vocab_size": 65024
|
|
|
|
| 7 |
],
|
| 8 |
"attention_dropout": 0.0,
|
| 9 |
"auto_map": {
|
| 10 |
+
"AutoConfig": "configuration_falcon.FalconConfig",
|
| 11 |
+
"AutoModel": "modeling_falcon.FalconModel",
|
| 12 |
+
"AutoModelForSequenceClassification": "modeling_falcon.FalconForSequenceClassification",
|
| 13 |
+
"AutoModelForTokenClassification": "modeling_falcon.FalconForTokenClassification",
|
| 14 |
+
"AutoModelForQuestionAnswering": "modeling_falcon.FalconForQuestionAnswering",
|
| 15 |
+
"AutoModelForCausalLM": "modeling_falcon.FalconForCausalLM"
|
| 16 |
},
|
| 17 |
"bias": false,
|
| 18 |
"bos_token_id": 11,
|
|
|
|
| 25 |
"model_type": "falcon",
|
| 26 |
"multi_query": true,
|
| 27 |
"new_decoder_architecture": false,
|
|
|
|
| 28 |
"num_attention_heads": 2,
|
| 29 |
"num_hidden_layers": 2,
|
|
|
|
| 30 |
"parallel_attn": true,
|
|
|
|
|
|
|
| 31 |
"transformers_version": "4.34.1",
|
| 32 |
"use_cache": true,
|
| 33 |
"vocab_size": 65024
|