Text Generation
Transformers
PyTorch
Safetensors
English
llama
text-generation-inference
unsloth
trl
sft
Instructions to use MatrixIA/LLama-3-8B-SQL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MatrixIA/LLama-3-8B-SQL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MatrixIA/LLama-3-8B-SQL")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MatrixIA/LLama-3-8B-SQL") model = AutoModelForCausalLM.from_pretrained("MatrixIA/LLama-3-8B-SQL") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MatrixIA/LLama-3-8B-SQL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MatrixIA/LLama-3-8B-SQL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MatrixIA/LLama-3-8B-SQL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MatrixIA/LLama-3-8B-SQL
- SGLang
How to use MatrixIA/LLama-3-8B-SQL 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 "MatrixIA/LLama-3-8B-SQL" \ --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": "MatrixIA/LLama-3-8B-SQL", "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 "MatrixIA/LLama-3-8B-SQL" \ --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": "MatrixIA/LLama-3-8B-SQL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio
How to use MatrixIA/LLama-3-8B-SQL 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 MatrixIA/LLama-3-8B-SQL 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 MatrixIA/LLama-3-8B-SQL to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for MatrixIA/LLama-3-8B-SQL to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="MatrixIA/LLama-3-8B-SQL", max_seq_length=2048, ) - Docker Model Runner
How to use MatrixIA/LLama-3-8B-SQL with Docker Model Runner:
docker model run hf.co/MatrixIA/LLama-3-8B-SQL
Update config.json
Browse files- config.json +39 -31
config.json
CHANGED
|
@@ -1,34 +1,42 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
-
"
|
| 4 |
-
|
| 5 |
-
"bias": "none",
|
| 6 |
-
"fan_in_fan_out": false,
|
| 7 |
-
"inference_mode": true,
|
| 8 |
-
"init_lora_weights": true,
|
| 9 |
-
"layer_replication": null,
|
| 10 |
-
"layers_pattern": null,
|
| 11 |
-
"layers_to_transform": null,
|
| 12 |
-
"loftq_config": {},
|
| 13 |
-
"lora_alpha": 16,
|
| 14 |
-
"lora_dropout": 0,
|
| 15 |
-
"megatron_config": null,
|
| 16 |
-
"megatron_core": "megatron.core",
|
| 17 |
-
"modules_to_save": null,
|
| 18 |
-
"peft_type": "LORA",
|
| 19 |
-
"r": 16,
|
| 20 |
-
"rank_pattern": {},
|
| 21 |
-
"revision": "unsloth",
|
| 22 |
-
"target_modules": [
|
| 23 |
-
"q_proj",
|
| 24 |
-
"gate_proj",
|
| 25 |
-
"up_proj",
|
| 26 |
-
"v_proj",
|
| 27 |
-
"k_proj",
|
| 28 |
-
"o_proj",
|
| 29 |
-
"down_proj"
|
| 30 |
],
|
| 31 |
-
"
|
| 32 |
-
"
|
| 33 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "MatrixIA/LLama-3-8B-SQL",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"LlamaForCausalLM"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"bos_token_id": 128000,
|
| 9 |
+
"eos_token_id": 128001,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 4096,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 14336,
|
| 14 |
+
"max_position_embeddings": 8192,
|
| 15 |
+
"model_type": "llama",
|
| 16 |
+
"num_attention_heads": 32,
|
| 17 |
+
"num_hidden_layers": 32,
|
| 18 |
+
"num_key_value_heads": 8,
|
| 19 |
+
"pretraining_tp": 1,
|
| 20 |
+
"quantization_config": {
|
| 21 |
+
"_load_in_4bit": true,
|
| 22 |
+
"_load_in_8bit": false,
|
| 23 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
| 24 |
+
"bnb_4bit_quant_type": "nf4",
|
| 25 |
+
"bnb_4bit_use_double_quant": true,
|
| 26 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 27 |
+
"llm_int8_has_fp16_weight": false,
|
| 28 |
+
"llm_int8_skip_modules": null,
|
| 29 |
+
"llm_int8_threshold": 6.0,
|
| 30 |
+
"load_in_4bit": true,
|
| 31 |
+
"load_in_8bit": false,
|
| 32 |
+
"quant_method": "bitsandbytes"
|
| 33 |
+
},
|
| 34 |
+
"rms_norm_eps": 1e-05,
|
| 35 |
+
"rope_scaling": null,
|
| 36 |
+
"rope_theta": 500000.0,
|
| 37 |
+
"tie_word_embeddings": false,
|
| 38 |
+
"torch_dtype": "bfloat16",
|
| 39 |
+
"transformers_version": "4.38.2",
|
| 40 |
+
"use_cache": true,
|
| 41 |
+
"vocab_size": 128256
|
| 42 |
}
|