Text Generation
Transformers
Safetensors
English
llama
text-generation-inference
unsloth
conversational
Instructions to use Abdulvajid/falcon_sql_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Abdulvajid/falcon_sql_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Abdulvajid/falcon_sql_model") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Abdulvajid/falcon_sql_model") model = AutoModelForCausalLM.from_pretrained("Abdulvajid/falcon_sql_model") 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
- vLLM
How to use Abdulvajid/falcon_sql_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Abdulvajid/falcon_sql_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Abdulvajid/falcon_sql_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Abdulvajid/falcon_sql_model
- SGLang
How to use Abdulvajid/falcon_sql_model 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 "Abdulvajid/falcon_sql_model" \ --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": "Abdulvajid/falcon_sql_model", "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 "Abdulvajid/falcon_sql_model" \ --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": "Abdulvajid/falcon_sql_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use Abdulvajid/falcon_sql_model with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Abdulvajid/falcon_sql_model to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Abdulvajid/falcon_sql_model to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Abdulvajid/falcon_sql_model to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Abdulvajid/falcon_sql_model", max_seq_length=2048, ) - Docker Model Runner
How to use Abdulvajid/falcon_sql_model with Docker Model Runner:
docker model run hf.co/Abdulvajid/falcon_sql_model
(Trained with Unsloth)
Browse files- chat_template.jinja +45 -0
- config.json +31 -0
- special_tokens_map.json +41 -0
- tokenizer.json +0 -0
- tokenizer_config.json +0 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if tools %}
|
| 2 |
+
{{- '<|system|>\n' }}
|
| 3 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 4 |
+
{{- messages[0]['content'] }}
|
| 5 |
+
{%- set remaining_messages = messages[1:] %}
|
| 6 |
+
{%- else %}
|
| 7 |
+
{%- set remaining_messages = messages %}
|
| 8 |
+
{%- endif %}
|
| 9 |
+
{{- 'You are a Falcon assistant skilled in function calling. You are helpful, respectful, and concise.\n\n# Tools\n\nYou have access to the following functions. You MUST use them to answer questions when needed. For each function call, you MUST return a JSON object inside <tool_call></tool_call> tags.\n\n<tools>' + tools|tojson(indent=2) + '</tools>\n\n# Output Format\n\nYour response MUST follow this format when making function calls:\n<tool_call>\n[\n {"name": "function_name", "arguments": {"arg1": "value1", "arg2": "value2"}},\n {"name": "another_function", "arguments": {"arg": "value"}}\n]\n</tool_call>\nIf no function calls are needed, respond normally without the tool_call tags.\n' }}
|
| 10 |
+
{%- for message in remaining_messages %}
|
| 11 |
+
{%- if message['role'] == 'user' %}
|
| 12 |
+
{{- '<|user|>\n' + message['content'] + '\n' }}
|
| 13 |
+
{%- elif message['role'] == 'assistant' %}
|
| 14 |
+
{%- if message.content %}
|
| 15 |
+
{{- '<|assistant|>\n' + message['content'] }}
|
| 16 |
+
{%- endif %}
|
| 17 |
+
{%- if message.tool_calls %}
|
| 18 |
+
{{- '\n<tool_call>\n' }}
|
| 19 |
+
{{- message.tool_calls|tojson(indent=2) }}
|
| 20 |
+
{{- '\n</tool_call>' }}
|
| 21 |
+
{%- endif %}
|
| 22 |
+
{{- eos_token + '\n' }}
|
| 23 |
+
{%- elif message['role'] == 'tool' %}
|
| 24 |
+
{{- '<|assistant|>\n<tool_response>\n' + message['content'] + '\n</tool_response>\n' }}
|
| 25 |
+
{%- endif %}
|
| 26 |
+
{%- endfor %}
|
| 27 |
+
{{- '<|assistant|>\n' if add_generation_prompt }}
|
| 28 |
+
{%- else %}
|
| 29 |
+
{%- for message in messages %}
|
| 30 |
+
{%- if message['role'] == 'system' %}
|
| 31 |
+
{{- '<|system|>\n' + message['content'] + '\n' }}
|
| 32 |
+
{%- elif message['role'] == 'user' %}
|
| 33 |
+
{{- '<|user|>\n' + message['content'] + '\n' }}
|
| 34 |
+
{%- elif message['role'] == 'assistant' %}
|
| 35 |
+
{%- if not loop.last %}
|
| 36 |
+
{{- '<|assistant|>\n' + message['content'] + eos_token + '\n' }}
|
| 37 |
+
{%- else %}
|
| 38 |
+
{{- '<|assistant|>\n' + message['content'] + eos_token }}
|
| 39 |
+
{%- endif %}
|
| 40 |
+
{%- endif %}
|
| 41 |
+
{%- if loop.last and add_generation_prompt %}
|
| 42 |
+
{{- '<|assistant|>\n' }}
|
| 43 |
+
{%- endif %}
|
| 44 |
+
{%- endfor %}
|
| 45 |
+
{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"torch_dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": 11,
|
| 10 |
+
"head_dim": 256,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 2048,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 8192,
|
| 15 |
+
"max_position_embeddings": 8192,
|
| 16 |
+
"mlp_bias": false,
|
| 17 |
+
"model_type": "llama",
|
| 18 |
+
"num_attention_heads": 8,
|
| 19 |
+
"num_hidden_layers": 18,
|
| 20 |
+
"num_key_value_heads": 4,
|
| 21 |
+
"pad_token_id": 2023,
|
| 22 |
+
"pretraining_tp": 1,
|
| 23 |
+
"rms_norm_eps": 1e-06,
|
| 24 |
+
"rope_scaling": null,
|
| 25 |
+
"rope_theta": 1000042,
|
| 26 |
+
"tie_word_embeddings": false,
|
| 27 |
+
"transformers_version": "4.57.1",
|
| 28 |
+
"unsloth_version": "2025.10.12",
|
| 29 |
+
"use_cache": false,
|
| 30 |
+
"vocab_size": 131072
|
| 31 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
">>TITLE<<",
|
| 4 |
+
">>ABSTRACT<<",
|
| 5 |
+
">>INTRODUCTION<<",
|
| 6 |
+
">>SUMMARY<<",
|
| 7 |
+
">>COMMENT<<",
|
| 8 |
+
">>ANSWER<<",
|
| 9 |
+
">>QUESTION<<",
|
| 10 |
+
">>DOMAIN<<",
|
| 11 |
+
">>EMAIL_ADDRESS<<",
|
| 12 |
+
">>IP_ADDRESS<<",
|
| 13 |
+
"<|startoftext|>",
|
| 14 |
+
">>IP_ADDRESS_0<<",
|
| 15 |
+
">>IP_ADDRESS_1<<",
|
| 16 |
+
">>IP_ADDRESS_2<<",
|
| 17 |
+
">>IP_ADDRESS_3<<",
|
| 18 |
+
">>IP_ADDRESS_4<<",
|
| 19 |
+
">>IP_ADDRESS_5<<",
|
| 20 |
+
">>IP_ADDRESS_6<<",
|
| 21 |
+
">>IP_ADDRESS_7<<",
|
| 22 |
+
">>IP_ADDRESS_8<<",
|
| 23 |
+
">>IP_ADDRESS_9<<",
|
| 24 |
+
">>PASSWORD<<",
|
| 25 |
+
">>KEY<<"
|
| 26 |
+
],
|
| 27 |
+
"eos_token": {
|
| 28 |
+
"content": "<|endoftext|>",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false
|
| 33 |
+
},
|
| 34 |
+
"pad_token": {
|
| 35 |
+
"content": "<|pad|>",
|
| 36 |
+
"lstrip": false,
|
| 37 |
+
"normalized": false,
|
| 38 |
+
"rstrip": false,
|
| 39 |
+
"single_word": false
|
| 40 |
+
}
|
| 41 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|