--- license: llama3.3 base_model: meta-llama/Llama-3.3-70B-Instruct tags: - awq - quantized - 4bit - llama - instruct library_name: transformers pipeline_tag: text-generation --- # Llama-3.3-8B-Instruct-AWQ 这是 Meta Llama 3.3 8B Instruct 模型的 AWQ 量化版本。 ## 模型描述 - **基础模型**: meta-llama/Llama-3.3-70B-Instruct - **量化方法**: AWQ (Activation-aware Weight Quantization) - **精度**: 4-bit - **用途**: 文本生成、对话、指令跟随 ## 使用方法 ```python from transformers import AutoTokenizer, AutoModelForCausalLM import torch # 加载模型和分词器 model_name = "crazymaker1122/Llama-3.3-8B-Instruct-awq-direct" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained( model_name, torch_dtype=torch.float16, device_map="auto" ) # 生成文本 prompt = "你好,请介绍一下你自己。" inputs = tokenizer(prompt, return_tensors="pt") outputs = model.generate(**inputs, max_new_tokens=200) response = tokenizer.decode(outputs[0], skip_special_tokens=True) print(response) ``` ## 量化信息 此模型使用 AWQ 方法进行量化,具有以下特点: - 大幅减少内存占用 - 保持良好的生成质量 - 支持快速推理 ## 注意事项 - 需要支持 AWQ 的推理框架 - 建议使用 GPU 进行推理 - 量化可能会略微影响模型性能 ## 许可证 请遵循原始 Llama 3.3 模型的许可证条款。