anaksor-ocr
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Runs Meta's Llama 3.1 8B Instruct chat model in 4-bit AWQ form, so it fits on a GPU with about 4 GiB of free memory for the weights. For developers who want a compact multilingual chat model.
Meta-Llama-3.1-8B-Instruct-AWQ-INT4 is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install -q --upgrade transformers autoawq accelerate
This is a community 4-bit AWQ copy of Meta Llama 3.1 8B Instruct, the instruction-tuned chat model. The quantization used AutoAWQ with GEMM kernels, zero-point quantization and a group size of 128. Meta's original is the BF16 version, and this copy is not an official Meta release.
It suits developers who want to run an 8B chat model on a modest GPU, in several languages, through transformers or a serving stack.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Software | App developers | Add a local chat model to a product | A support assistant that runs on one GPU |
| Research | NLP researchers | Test an instruction model at lower memory cost | Comparing 4-bit output with the original |
| Operations | Platform engineers | Serve a quantized model for internal tools | Running it behind text-generation-inference |
| Education | Students and educators | Experiment with a language model on a single graphics card | A classroom demo of chat generation |
Skip it if you have no NVIDIA GPU, since the card's example moves the model to CUDA.
| Use case | Who | What they get back |
|---|---|---|
| Local chat | Developers | Replies from an 8B instruction model on a smaller GPU |
| Multilingual dialogue | Product teams | Chat in the listed languages, including German, French and Hindi |
| Serving | Platform teams | A quantized model behind an optimized inference server |
You need these first.
pip install -q --upgrade transformers autoawq accelerate
pip install -U huggingface_hub hf download hugging-quants/Meta-Llama-3.1-8B-Instruct-AWQ-INT4
Load the model with the AWQ config, apply the chat template to your messages and generate. The card's script sets a system message and a user question, then prints the reply.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, AwqConfig
model_id = "hugging-quants/Meta-Llama-3.1-8B-Instruct-AWQ-INT4"
quantization_config = AwqConfig(
bits=4,
fuse_max_seq_len=512, # Note: Update this as per your use-case
do_fuse=True,
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
low_cpu_mem_usage=True,
device_map="auto",
quantization_config=quantization_config
)
prompt = [
{"role": "system", "content": "You are a helpful assistant, that responds as a pirate."},
{"role": "user", "content": "What's Deep Learning?"},
]
inputs = tokenizer.apply_chat_template(
prompt,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
).to("cuda")
outputs = model.generate(**inputs, do_sample=True, max_new_tokens=256)
print(tokenizer.batch_decode(outputs[:, inputs['input_ids'].shape[1]:], skip_special_tokens=True)[0])| Tool | What it does |
|---|---|
| transformers | The card's recommended way to load and run the model |
| autoawq | An alternative loader built on top of transformers |
| text-generation-inference | Serves the model with Marlin kernels and needs Docker |
| fuse_max_seq_len | A fusion length setting that you change to fit your use |
Give the model a system message telling it to answer as a pirate, then ask it what deep learning is. It writes a reply of up to 256 new tokens, in that voice. The wording differs on each run because sampling is switched on.
If you are new, quantization shrinks a model so it fits on smaller hardware. Run the card's Python script once to see a reply, then change the user question to something of your own.
If you know the field, this is INT4 AWQ with GEMM kernels and zero-point quantization at group size 128. The card notes the 4 GiB figure excludes the KV cache and CUDA graphs, so leave headroom. It lists TGI with Marlin kernels for faster inference.
Runs Meta's Llama 3.1 8B Instruct chat model in 4-bit AWQ form, so it fits on a GPU with about 4 GiB of free memory for the weights. For developers who want a compact multilingual chat model.
Made by hugging-quants on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: This is a community 4-bit AWQ copy of Meta Llama 3.1 8B Instruct, the instruction-tuned chat model. The quantization used AutoAWQ with GEMM kernels, zero-point quantization and a group size of 128. Meta's original is the BF16 version, and this copy is not an official Meta release.
Who it suits: It suits developers who want to run an 8B chat model on a modest GPU, in several languages, through transformers or a serving stack.
Industry | Who uses it | How they use it | Example
Software | App developers | Add a local chat model to a product | A support assistant that runs on one GPU
Research | NLP researchers | Test an instruction model at lower memory cost | Comparing 4-bit output with the original
Operations | Platform engineers | Serve a quantized model for internal tools | Running it behind text-generation-inference
Education | Students and educators | Experiment with a language model on a single graphics card | A classroom demo of chat generation
Skip it if you have no NVIDIA GPU, since the card's example moves the model to CUDA.
Where to use it:
Use case | Who | What they get back
Local chat | Developers | Replies from an 8B instruction model on a smaller GPU
Multilingual dialogue | Product teams | Chat in the listed languages, including German, French and Hindi
Serving | Platform teams | A quantized model behind an optimized inference server
How to set it up: You need these first.
pip install -q --upgrade transformers autoawq accelerate
pip install -U huggingface_hub
hf download hugging-quants/Meta-Llama-3.1-8B-Instruct-AWQ-INT4
How to use it: Load the model with the AWQ config, apply the chat template to your messages and generate. The card's script sets a system message and a user question, then prints the reply.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, AwqConfig
model_id = "hugging-quants/Meta-Llama-3.1-8B-Instruct-AWQ-INT4"
quantization_config = AwqConfig(
bits=4,
fuse_max_seq_len=512, # Note: Update this as per your use-case
do_fuse=True,
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
low_cpu_mem_usage=True,
device_map="auto",
quantization_config=quantization_config
)
prompt = [
{"role": "system", "content": "You are a helpful assistant, that responds as a pirate."},
{"role": "user", "content": "What's Deep Learning?"},
]
inputs = tokenizer.apply_chat_template(
prompt,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
).to("cuda")
outputs = model.generate(**inputs, do_sample=True, max_new_tokens=256)
print(tokenizer.batch_decode(outputs[:, inputs['input_ids'].shape[1]:], skip_special_tokens=True)[0])
Tool | What it does
transformers | The card's recommended way to load and run the model
autoawq | An alternative loader built on top of transformers
text-generation-inference | Serves the model with Marlin kernels and needs Docker
fuse_max_seq_len | A fusion length setting that you change to fit your use
Example: Give the model a system message telling it to answer as a pirate, then ask it what deep learning is. It writes a reply of up to 256 new tokens, in that voice. The wording differs on each run because sampling is switched on.
For newcomers and experts: If you are new, quantization shrinks a model so it fits on smaller hardware. Run the card's Python script once to see a reply, then change the user question to something of your own.
If you know the field, this is INT4 AWQ with GEMM kernels and zero-point quantization at group size 128. The card notes the 4 GiB figure excludes the KV cache and CUDA graphs, so leave headroom. It lists TGI with Marlin kernels for faster inference.
Meta's Llama 3.1 8B Instruct weights
AutoAWQ quantizes them to INT4
You load them with an AwqConfig
Chat template builds the prompt
Generate returns the reply
Good to know:
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download hugging-quants/Meta-Llama-3.1-8B-Instruct-AWQ-INT4
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 6 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| Meta-Llama-3.1-8B-Instruct-AWQ-INT4 This page | 319,739 | 96 | 8B | llama3.1 | |
| Llama-3.2-3B-Instruct-GGUF by unslothShares meta · llama · text-generation | 243,788 | 93 | 3.2B | llama3.2 | |
| Llama-3.2-1B-Instruct-GGUFShares meta · llama · text-generation | 53,598 | 85 | 1.2B | llama3.2 | |
| Meta-Llama-3.1-8B-Instruct-GGUFShares meta · llama · text-generation | 322,920 | 433 | 8B | llama3.1 | |
| Llama-3.2-3B-Instruct-GGUFShares meta · llama · text-generation | 190,537 | 261 | 3.2B | llama3.2 | |
| Llama-3.2-1B-Instruct GGUFShares meta · llama · text-generation | 138,010 | 188 | 1.2B | llama3.2 |
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Qwen · Kit
Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…
ACE-Step · Kit
Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
block · Kit
Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…
backnotprop · Kit
Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.