Text Generation
Transformers
Safetensors
llama
axolotl
edge
bitnet
conversational
text-generation-inference
8-bit precision
Instructions to use axolotl-ai-co/Falcon-E-1.2-3B-Exp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use axolotl-ai-co/Falcon-E-1.2-3B-Exp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="axolotl-ai-co/Falcon-E-1.2-3B-Exp") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("axolotl-ai-co/Falcon-E-1.2-3B-Exp") model = AutoModelForCausalLM.from_pretrained("axolotl-ai-co/Falcon-E-1.2-3B-Exp", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use axolotl-ai-co/Falcon-E-1.2-3B-Exp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "axolotl-ai-co/Falcon-E-1.2-3B-Exp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "axolotl-ai-co/Falcon-E-1.2-3B-Exp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/axolotl-ai-co/Falcon-E-1.2-3B-Exp
- SGLang
How to use axolotl-ai-co/Falcon-E-1.2-3B-Exp 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 "axolotl-ai-co/Falcon-E-1.2-3B-Exp" \ --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": "axolotl-ai-co/Falcon-E-1.2-3B-Exp", "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 "axolotl-ai-co/Falcon-E-1.2-3B-Exp" \ --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": "axolotl-ai-co/Falcon-E-1.2-3B-Exp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use axolotl-ai-co/Falcon-E-1.2-3B-Exp with Docker Model Runner:
docker model run hf.co/axolotl-ai-co/Falcon-E-1.2-3B-Exp
Upload LlamaForCausalLM
Browse files- config.json +43 -0
- generation_config.json +9 -0
- model.safetensors +3 -0
config.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": 11,
|
| 10 |
+
"head_dim": 128,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 2048,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 13312,
|
| 15 |
+
"is_bitnet_config": true,
|
| 16 |
+
"max_position_embeddings": 32768,
|
| 17 |
+
"mlp_bias": false,
|
| 18 |
+
"model_type": "llama",
|
| 19 |
+
"num_attention_heads": 16,
|
| 20 |
+
"num_hidden_layers": 32,
|
| 21 |
+
"num_key_value_heads": 2,
|
| 22 |
+
"pad_token_id": 11,
|
| 23 |
+
"pretraining_tp": 1,
|
| 24 |
+
"quantization_config": {
|
| 25 |
+
"linear_class": "bitlinear",
|
| 26 |
+
"modules_to_not_convert": [
|
| 27 |
+
"lm_head"
|
| 28 |
+
],
|
| 29 |
+
"quant_method": "bitnet",
|
| 30 |
+
"quantization_mode": "offline",
|
| 31 |
+
"rms_norm_eps": 1e-06,
|
| 32 |
+
"use_rms_norm": false
|
| 33 |
+
},
|
| 34 |
+
"rms_norm_eps": 1e-05,
|
| 35 |
+
"rope_parameters": {
|
| 36 |
+
"rope_theta": 1000000,
|
| 37 |
+
"rope_type": "default"
|
| 38 |
+
},
|
| 39 |
+
"tie_word_embeddings": false,
|
| 40 |
+
"transformers_version": "5.5.0",
|
| 41 |
+
"use_cache": false,
|
| 42 |
+
"vocab_size": 32768
|
| 43 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
11
|
| 6 |
+
],
|
| 7 |
+
"pad_token_id": 11,
|
| 8 |
+
"transformers_version": "5.5.0"
|
| 9 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a37d359dbccd7d782d30d3be4a680864abcf24a5eb8a0214ea3035906de6c543
|
| 3 |
+
size 998568704
|