Quantization made by Richard Erkhov. [Github](https://github.com/RichardErkhov) [Discord](https://discord.gg/pvy7H8DZMG) [Request more models](https://github.com/RichardErkhov/quant_request) Llama3-Chinese-8B-Instruct - GGUF - Model creator: https://huggingface.co/FlagAlpha/ - Original model: https://huggingface.co/FlagAlpha/Llama3-Chinese-8B-Instruct/ | Name | Quant method | Size | | ---- | ---- | ---- | | [Llama3-Chinese-8B-Instruct.Q2_K.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q2_K.gguf) | Q2_K | 2.96GB | | [Llama3-Chinese-8B-Instruct.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.IQ3_XS.gguf) | IQ3_XS | 3.28GB | | [Llama3-Chinese-8B-Instruct.IQ3_S.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.IQ3_S.gguf) | IQ3_S | 1.58GB | | [Llama3-Chinese-8B-Instruct.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q3_K_S.gguf) | Q3_K_S | 0.35GB | | [Llama3-Chinese-8B-Instruct.IQ3_M.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.IQ3_M.gguf) | IQ3_M | 3.52GB | | [Llama3-Chinese-8B-Instruct.Q3_K.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q3_K.gguf) | Q3_K | 3.74GB | | [Llama3-Chinese-8B-Instruct.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q3_K_M.gguf) | Q3_K_M | 3.74GB | | [Llama3-Chinese-8B-Instruct.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q3_K_L.gguf) | Q3_K_L | 4.03GB | | [Llama3-Chinese-8B-Instruct.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.IQ4_XS.gguf) | IQ4_XS | 4.18GB | | [Llama3-Chinese-8B-Instruct.Q4_0.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q4_0.gguf) | Q4_0 | 4.34GB | | [Llama3-Chinese-8B-Instruct.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.IQ4_NL.gguf) | IQ4_NL | 4.38GB | | [Llama3-Chinese-8B-Instruct.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q4_K_S.gguf) | Q4_K_S | 4.37GB | | [Llama3-Chinese-8B-Instruct.Q4_K.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q4_K.gguf) | Q4_K | 4.58GB | | [Llama3-Chinese-8B-Instruct.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q4_K_M.gguf) | Q4_K_M | 4.58GB | | [Llama3-Chinese-8B-Instruct.Q4_1.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q4_1.gguf) | Q4_1 | 4.78GB | | [Llama3-Chinese-8B-Instruct.Q5_0.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q5_0.gguf) | Q5_0 | 5.21GB | | [Llama3-Chinese-8B-Instruct.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q5_K_S.gguf) | Q5_K_S | 5.21GB | | [Llama3-Chinese-8B-Instruct.Q5_K.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q5_K.gguf) | Q5_K | 5.34GB | | [Llama3-Chinese-8B-Instruct.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q5_K_M.gguf) | Q5_K_M | 5.34GB | | [Llama3-Chinese-8B-Instruct.Q5_1.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q5_1.gguf) | Q5_1 | 5.65GB | | [Llama3-Chinese-8B-Instruct.Q6_K.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q6_K.gguf) | Q6_K | 6.14GB | | [Llama3-Chinese-8B-Instruct.Q8_0.gguf](https://huggingface.co/RichardErkhov/FlagAlpha_-_Llama3-Chinese-8B-Instruct-gguf/blob/main/Llama3-Chinese-8B-Instruct.Q8_0.gguf) | Q8_0 | 7.95GB | Original model description: --- license: apache-2.0 tags: - llama3 - chinese --- # Llama3-Chinese-8B-Instruct Llama3-Chinese-8B-Instruct基于Llama3-8B中文微调对话模型,由Llama中文社区和AtomEcho(原子回声)联合研发,我们会持续提供更新的模型参数,模型训练过程见 [https://llama.family](https://llama.family)。 模型的部署、训练、微调等方法详见Llama中文社区GitHub仓库:[https://github.com/LlamaFamily/Llama-Chinese](https://github.com/LlamaFamily/Llama-Chinese) ## 如何使用 ``` import transformers import torch model_id = "FlagAlpha/Llama3-Chinese-8B-Instruct" pipeline = transformers.pipeline( "text-generation", model=model_id, model_kwargs={"torch_dtype": torch.float16}, device="cuda", ) messages = [{"role": "system", "content": ""}] messages.append( {"role": "user", "content": "介绍一下机器学习"} ) prompt = pipeline.tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True ) terminators = [ pipeline.tokenizer.eos_token_id, pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>") ] outputs = pipeline( prompt, max_new_tokens=512, eos_token_id=terminators, do_sample=True, temperature=0.6, top_p=0.9 ) content = outputs[0]["generated_text"][len(prompt):] print(content) ```