Text Generation
Transformers
PyTorch
TensorBoard
English
RefinedWebModel
custom_code
text-generation-inference
4-bit precision
Instructions to use subset-data/falcon-testing with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use subset-data/falcon-testing with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="subset-data/falcon-testing", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("subset-data/falcon-testing", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use subset-data/falcon-testing with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "subset-data/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": "subset-data/falcon-testing", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/subset-data/falcon-testing
- SGLang
How to use subset-data/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 "subset-data/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": "subset-data/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 "subset-data/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": "subset-data/falcon-testing", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use subset-data/falcon-testing with Docker Model Runner:
docker model run hf.co/subset-data/falcon-testing
Update config.json
Browse files- config.json +14 -37
config.json
CHANGED
|
@@ -1,39 +1,16 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
-
"
|
| 4 |
-
"
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
],
|
| 7 |
-
"
|
| 8 |
-
|
| 9 |
-
"AutoConfig": "tiiuae/falcon-7b-instruct--configuration_RW.RWConfig",
|
| 10 |
-
"AutoModelForCausalLM": "tiiuae/falcon-7b-instruct--modelling_RW.RWForCausalLM"
|
| 11 |
-
},
|
| 12 |
-
"bias": false,
|
| 13 |
-
"bos_token_id": 11,
|
| 14 |
-
"eos_token_id": 11,
|
| 15 |
-
"hidden_dropout": 0.0,
|
| 16 |
-
"hidden_size": 4544,
|
| 17 |
-
"initializer_range": 0.02,
|
| 18 |
-
"layer_norm_epsilon": 1e-05,
|
| 19 |
-
"model_type": "RefinedWebModel",
|
| 20 |
-
"multi_query": true,
|
| 21 |
-
"n_head": 71,
|
| 22 |
-
"n_layer": 32,
|
| 23 |
-
"parallel_attn": true,
|
| 24 |
-
"quantization_config": {
|
| 25 |
-
"bnb_4bit_compute_dtype": "float16",
|
| 26 |
-
"bnb_4bit_quant_type": "nf4",
|
| 27 |
-
"bnb_4bit_use_double_quant": false,
|
| 28 |
-
"llm_int8_enable_fp32_cpu_offload": false,
|
| 29 |
-
"llm_int8_has_fp16_weight": false,
|
| 30 |
-
"llm_int8_skip_modules": null,
|
| 31 |
-
"llm_int8_threshold": 6.0,
|
| 32 |
-
"load_in_4bit": true,
|
| 33 |
-
"load_in_8bit": false
|
| 34 |
-
},
|
| 35 |
-
"torch_dtype": "bfloat16",
|
| 36 |
-
"transformers_version": "4.30.0.dev0",
|
| 37 |
-
"use_cache": false,
|
| 38 |
-
"vocab_size": 65024
|
| 39 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"base_model_name_or_path": "tiiuae/falcon-7b",
|
| 3 |
+
"bias": "none",
|
| 4 |
+
"fan_in_fan_out": false,
|
| 5 |
+
"inference_mode": true,
|
| 6 |
+
"init_lora_weights": true,
|
| 7 |
+
"lora_alpha": 32,
|
| 8 |
+
"lora_dropout": 0.05,
|
| 9 |
+
"modules_to_save": null,
|
| 10 |
+
"peft_type": "LORA",
|
| 11 |
+
"r": 16,
|
| 12 |
+
"target_modules": [
|
| 13 |
+
"query_key_value"
|
| 14 |
],
|
| 15 |
+
"task_type": "CAUSAL_LM"
|
| 16 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|