Instructions to use QuantFlip/Falcon3-3B-Base-1.58bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFlip/Falcon3-3B-Base-1.58bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantFlip/Falcon3-3B-Base-1.58bit")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("QuantFlip/Falcon3-3B-Base-1.58bit") model = AutoModelForCausalLM.from_pretrained("QuantFlip/Falcon3-3B-Base-1.58bit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use QuantFlip/Falcon3-3B-Base-1.58bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFlip/Falcon3-3B-Base-1.58bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFlip/Falcon3-3B-Base-1.58bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/QuantFlip/Falcon3-3B-Base-1.58bit
- SGLang
How to use QuantFlip/Falcon3-3B-Base-1.58bit 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 "QuantFlip/Falcon3-3B-Base-1.58bit" \ --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": "QuantFlip/Falcon3-3B-Base-1.58bit", "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 "QuantFlip/Falcon3-3B-Base-1.58bit" \ --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": "QuantFlip/Falcon3-3B-Base-1.58bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use QuantFlip/Falcon3-3B-Base-1.58bit with Docker Model Runner:
docker model run hf.co/QuantFlip/Falcon3-3B-Base-1.58bit
Download config.json from QuantFlip/Falcon3-3B-Base-1.58bit: direct link, hf CLI and curl.
- Browser
- Download file 968 Bytes
-
https://huggingface.co/QuantFlip/Falcon3-3B-Base-1.58bit/resolve/main/config.json
- Command line
-
hf download hf://QuantFlip/Falcon3-3B-Base-1.58bit/config.json
-
curl -L -o config.json https://huggingface.co/QuantFlip/Falcon3-3B-Base-1.58bit/resolve/main/config.json
968 Bytes
| { | |
| "_name_or_path": "/home/ubuntu/hang/Checkpoints/Falcon3-3B-BITNET-FT-16BT/hf_bitnet", | |
| "activation": "swiglu", | |
| "architectures": [ | |
| "LlamaForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 11, | |
| "eos_token_id": 11, | |
| "head_dim": 256, | |
| "hidden_act": "silu", | |
| "hidden_size": 3072, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 9216, | |
| "is_bitnet_config": true, | |
| "max_position_embeddings": 4096, | |
| "mlp_bias": false, | |
| "model_type": "llama", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 22, | |
| "num_key_value_heads": 4, | |
| "parallel_attn": false, | |
| "pretraining_tp": 1, | |
| "quantization_config": { | |
| "modules_to_not_convert": [ | |
| "lm_head" | |
| ], | |
| "quant_method": "bitnet" | |
| }, | |
| "rms_norm_eps": 1e-06, | |
| "rope_scaling": null, | |
| "rope_theta": 1000042, | |
| "tie_word_embeddings": false, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.46.0.dev0", | |
| "use_cache": true, | |
| "vocab_size": 131072 | |
| } | |