Text Generation
Transformers
PyTorch
Safetensors
GGUF
English
llama
text-generation-inference
unsloth
trl
sft
Instructions to use harsh12100/Llama-3.2-1b-bnb-4bit-python with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use harsh12100/Llama-3.2-1b-bnb-4bit-python with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="harsh12100/Llama-3.2-1b-bnb-4bit-python")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("harsh12100/Llama-3.2-1b-bnb-4bit-python") model = AutoModelForCausalLM.from_pretrained("harsh12100/Llama-3.2-1b-bnb-4bit-python", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use harsh12100/Llama-3.2-1b-bnb-4bit-python with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf harsh12100/Llama-3.2-1b-bnb-4bit-python:Q4_K_M # Run inference directly in the terminal: llama cli -hf harsh12100/Llama-3.2-1b-bnb-4bit-python:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf harsh12100/Llama-3.2-1b-bnb-4bit-python:Q4_K_M # Run inference directly in the terminal: llama cli -hf harsh12100/Llama-3.2-1b-bnb-4bit-python:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf harsh12100/Llama-3.2-1b-bnb-4bit-python:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf harsh12100/Llama-3.2-1b-bnb-4bit-python:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf harsh12100/Llama-3.2-1b-bnb-4bit-python:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf harsh12100/Llama-3.2-1b-bnb-4bit-python:Q4_K_M
Use Docker
docker model run hf.co/harsh12100/Llama-3.2-1b-bnb-4bit-python:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use harsh12100/Llama-3.2-1b-bnb-4bit-python with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "harsh12100/Llama-3.2-1b-bnb-4bit-python" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "harsh12100/Llama-3.2-1b-bnb-4bit-python", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/harsh12100/Llama-3.2-1b-bnb-4bit-python:Q4_K_M
- SGLang
How to use harsh12100/Llama-3.2-1b-bnb-4bit-python 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 "harsh12100/Llama-3.2-1b-bnb-4bit-python" \ --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": "harsh12100/Llama-3.2-1b-bnb-4bit-python", "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 "harsh12100/Llama-3.2-1b-bnb-4bit-python" \ --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": "harsh12100/Llama-3.2-1b-bnb-4bit-python", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use harsh12100/Llama-3.2-1b-bnb-4bit-python with Ollama:
ollama run hf.co/harsh12100/Llama-3.2-1b-bnb-4bit-python:Q4_K_M
- Unsloth Studio
How to use harsh12100/Llama-3.2-1b-bnb-4bit-python 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 harsh12100/Llama-3.2-1b-bnb-4bit-python 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 harsh12100/Llama-3.2-1b-bnb-4bit-python to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for harsh12100/Llama-3.2-1b-bnb-4bit-python to start chatting
- Docker Model Runner
How to use harsh12100/Llama-3.2-1b-bnb-4bit-python with Docker Model Runner:
docker model run hf.co/harsh12100/Llama-3.2-1b-bnb-4bit-python:Q4_K_M
- Lemonade
How to use harsh12100/Llama-3.2-1b-bnb-4bit-python with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull harsh12100/Llama-3.2-1b-bnb-4bit-python:Q4_K_M
Run and chat with the model
lemonade run user.Llama-3.2-1b-bnb-4bit-python-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Trained with Unsloth
Browse files- config.json +37 -2
- pytorch_model.bin +1 -1
config.json
CHANGED
|
@@ -1,3 +1,38 @@
|
|
| 1 |
{
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "unsloth/Llama-3.2-1B-bnb-4bit",
|
| 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 |
+
"head_dim": 64,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 2048,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 8192,
|
| 15 |
+
"max_position_embeddings": 131072,
|
| 16 |
+
"mlp_bias": false,
|
| 17 |
+
"model_type": "llama",
|
| 18 |
+
"num_attention_heads": 32,
|
| 19 |
+
"num_hidden_layers": 16,
|
| 20 |
+
"num_key_value_heads": 8,
|
| 21 |
+
"pad_token_id": 128004,
|
| 22 |
+
"pretraining_tp": 1,
|
| 23 |
+
"rms_norm_eps": 1e-05,
|
| 24 |
+
"rope_scaling": {
|
| 25 |
+
"factor": 32.0,
|
| 26 |
+
"high_freq_factor": 4.0,
|
| 27 |
+
"low_freq_factor": 1.0,
|
| 28 |
+
"original_max_position_embeddings": 8192,
|
| 29 |
+
"rope_type": "llama3"
|
| 30 |
+
},
|
| 31 |
+
"rope_theta": 500000.0,
|
| 32 |
+
"tie_word_embeddings": true,
|
| 33 |
+
"torch_dtype": "float16",
|
| 34 |
+
"transformers_version": "4.46.2",
|
| 35 |
+
"unsloth_version": "2024.11.9",
|
| 36 |
+
"use_cache": true,
|
| 37 |
+
"vocab_size": 128256
|
| 38 |
+
}
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2471678098
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:982a82054ad633d4fa4741ddfa2d7317af390bcc123a98721ba9ab2d15d9ee52
|
| 3 |
size 2471678098
|