Text Generation
Transformers
Safetensors
English
code
fluxnat
cybersecurity
vulnerability-detection
sast
security-audit
code-security
cwe
owasp
unsloth
code-analysis
penetration-testing
secure-coding
conversational
custom_code
Instructions to use k4ran909/Fluxnat-Coder-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use k4ran909/Fluxnat-Coder-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="k4ran909/Fluxnat-Coder-3B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("k4ran909/Fluxnat-Coder-3B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use k4ran909/Fluxnat-Coder-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "k4ran909/Fluxnat-Coder-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "k4ran909/Fluxnat-Coder-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/k4ran909/Fluxnat-Coder-3B
- SGLang
How to use k4ran909/Fluxnat-Coder-3B 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 "k4ran909/Fluxnat-Coder-3B" \ --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": "k4ran909/Fluxnat-Coder-3B", "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 "k4ran909/Fluxnat-Coder-3B" \ --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": "k4ran909/Fluxnat-Coder-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use k4ran909/Fluxnat-Coder-3B with Docker Model Runner:
docker model run hf.co/k4ran909/Fluxnat-Coder-3B
Update config.json to pure Fluxnat architecture with auto_map
Browse files- config.json +76 -71
config.json
CHANGED
|
@@ -1,72 +1,77 @@
|
|
| 1 |
-
{
|
| 2 |
-
"architectures": [
|
| 3 |
-
"
|
| 4 |
-
],
|
| 5 |
-
"attention_dropout": 0.0,
|
| 6 |
-
"bos_token_id": 151643,
|
| 7 |
-
"torch_dtype": "bfloat16",
|
| 8 |
-
"eos_token_id": 151645,
|
| 9 |
-
"hidden_act": "silu",
|
| 10 |
-
"hidden_size": 2048,
|
| 11 |
-
"initializer_range": 0.02,
|
| 12 |
-
"intermediate_size": 11008,
|
| 13 |
-
"layer_types": [
|
| 14 |
-
"full_attention",
|
| 15 |
-
"full_attention",
|
| 16 |
-
"full_attention",
|
| 17 |
-
"full_attention",
|
| 18 |
-
"full_attention",
|
| 19 |
-
"full_attention",
|
| 20 |
-
"full_attention",
|
| 21 |
-
"full_attention",
|
| 22 |
-
"full_attention",
|
| 23 |
-
"full_attention",
|
| 24 |
-
"full_attention",
|
| 25 |
-
"full_attention",
|
| 26 |
-
"full_attention",
|
| 27 |
-
"full_attention",
|
| 28 |
-
"full_attention",
|
| 29 |
-
"full_attention",
|
| 30 |
-
"full_attention",
|
| 31 |
-
"full_attention",
|
| 32 |
-
"full_attention",
|
| 33 |
-
"full_attention",
|
| 34 |
-
"full_attention",
|
| 35 |
-
"full_attention",
|
| 36 |
-
"full_attention",
|
| 37 |
-
"full_attention",
|
| 38 |
-
"full_attention",
|
| 39 |
-
"full_attention",
|
| 40 |
-
"full_attention",
|
| 41 |
-
"full_attention",
|
| 42 |
-
"full_attention",
|
| 43 |
-
"full_attention",
|
| 44 |
-
"full_attention",
|
| 45 |
-
"full_attention",
|
| 46 |
-
"full_attention",
|
| 47 |
-
"full_attention",
|
| 48 |
-
"full_attention",
|
| 49 |
-
"full_attention"
|
| 50 |
-
],
|
| 51 |
-
"max_position_embeddings": 32768,
|
| 52 |
-
"max_window_layers": 70,
|
| 53 |
-
"model_type": "
|
| 54 |
-
"num_attention_heads": 16,
|
| 55 |
-
"num_hidden_layers": 36,
|
| 56 |
-
"num_key_value_heads": 2,
|
| 57 |
-
"pad_token_id": 151665,
|
| 58 |
-
"rms_norm_eps": 1e-06,
|
| 59 |
-
"rope_parameters": {
|
| 60 |
-
"rope_theta": 1000000.0,
|
| 61 |
-
"rope_type": "default"
|
| 62 |
-
},
|
| 63 |
-
"sliding_window": null,
|
| 64 |
-
"tie_word_embeddings": true,
|
| 65 |
-
"unsloth_fixed": true,
|
| 66 |
-
"use_cache": true,
|
| 67 |
-
"use_sliding_window": false,
|
| 68 |
-
"vocab_size": 151936,
|
| 69 |
-
"_name_or_path": "fluxnat/Fluxnat-Coder-3B",
|
| 70 |
-
"model_name": "Fluxnat-Coder-3B",
|
| 71 |
-
"model_author": "Fluxnat"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
}
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"FluxnatForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"bos_token_id": 151643,
|
| 7 |
+
"torch_dtype": "bfloat16",
|
| 8 |
+
"eos_token_id": 151645,
|
| 9 |
+
"hidden_act": "silu",
|
| 10 |
+
"hidden_size": 2048,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 11008,
|
| 13 |
+
"layer_types": [
|
| 14 |
+
"full_attention",
|
| 15 |
+
"full_attention",
|
| 16 |
+
"full_attention",
|
| 17 |
+
"full_attention",
|
| 18 |
+
"full_attention",
|
| 19 |
+
"full_attention",
|
| 20 |
+
"full_attention",
|
| 21 |
+
"full_attention",
|
| 22 |
+
"full_attention",
|
| 23 |
+
"full_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"full_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"full_attention",
|
| 29 |
+
"full_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"full_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"full_attention",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"full_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"full_attention",
|
| 47 |
+
"full_attention",
|
| 48 |
+
"full_attention",
|
| 49 |
+
"full_attention"
|
| 50 |
+
],
|
| 51 |
+
"max_position_embeddings": 32768,
|
| 52 |
+
"max_window_layers": 70,
|
| 53 |
+
"model_type": "fluxnat",
|
| 54 |
+
"num_attention_heads": 16,
|
| 55 |
+
"num_hidden_layers": 36,
|
| 56 |
+
"num_key_value_heads": 2,
|
| 57 |
+
"pad_token_id": 151665,
|
| 58 |
+
"rms_norm_eps": 1e-06,
|
| 59 |
+
"rope_parameters": {
|
| 60 |
+
"rope_theta": 1000000.0,
|
| 61 |
+
"rope_type": "default"
|
| 62 |
+
},
|
| 63 |
+
"sliding_window": null,
|
| 64 |
+
"tie_word_embeddings": true,
|
| 65 |
+
"unsloth_fixed": true,
|
| 66 |
+
"use_cache": true,
|
| 67 |
+
"use_sliding_window": false,
|
| 68 |
+
"vocab_size": 151936,
|
| 69 |
+
"_name_or_path": "fluxnat/Fluxnat-Coder-3B",
|
| 70 |
+
"model_name": "Fluxnat-Coder-3B",
|
| 71 |
+
"model_author": "Fluxnat",
|
| 72 |
+
"auto_map": {
|
| 73 |
+
"AutoConfig": "configuration_fluxnat.FluxnatConfig",
|
| 74 |
+
"AutoModel": "modeling_fluxnat.FluxnatModel",
|
| 75 |
+
"AutoModelForCausalLM": "modeling_fluxnat.FluxnatForCausalLM"
|
| 76 |
+
}
|
| 77 |
}
|