guihonghao
guihonghao
> Thank you, fixing the version of `bitsandbytes` to 0.37.2 resolved the issue for me. ([TimDettmers/bitsandbytes#324](https://github.com/TimDettmers/bitsandbytes/issues/324)) > > ``` > bitsandbytes==0.37.2 > ``` Yes, I meet an OOM when fine-tuning...
你好,环境版本是下面这些。如果8bit量化存在问题,可以尝试使用4bit量化。 ``` accelerate==0.21.0 transformers==4.33.0 bitsandbytes==0.39.1 ```
``` quantization_config=BitsAndBytesConfig( load_in_4bit=True, llm_int8_threshold=6.0, llm_int8_has_fp16_weight=False, bnb_4bit_compute_dtype=torch.bfloat16, bnb_4bit_use_double_quant=True, bnb_4bit_quant_type="nf4", ) model = AutoModelForCausalLM.from_pretrained( model_path, config=config, device_map="auto", quantization_config=quantization_config, torch_dtype=torch.bfloat16, trust_remote_code=True, ) ``` 设置并传入quantization_config参数
你好,model_name_or_path 是底座模型即https://huggingface.co/baichuan-inc/Baichuan2-13B-Chat。 另外,我们新发布的信息抽取大模型OneKE在信息抽取方面效果更佳 https://github.com/zjunlp/DeepKE/blob/main/example/llm/OneKE.md
你好,我们采用的环境是 ``` accelerate==0.21.0 transformers==4.33.0 bitsandbytes==0.39.1 ```
1、参考 [data](https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/data) 目录下各个任务中sample.json文件格式组织测试文件,schema.json组织schema信息。 2、参考 https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/README_CN.md#23%E6%B5%8B%E8%AF%95%E6%95%B0%E6%8D%AE%E8%BD%AC%E6%8D%A2 步骤,按照下面的代码转换sample.json文件为模型可输入的文件test.json ```python python ie2instruction/convert_func.py \ --src_path data/NER/sample.json \ --tgt_path data/NER/test.json \ --schema_path data/NER/schema.json \ --language zh \ --task NER \ --split_num 6 \ --split test...
参考代码:https://github.com/zjunlp/DeepKE/blob/main/example/llm/InstructKGC/ie2instruction/eval/metric/ner_metric.py
参考资料:https://blog.csdn.net/weixin_45498383/article/details/135740711
你好,三元组抽取的prompt模版是 RE + 'zh': "你是专门进行关系抽取的专家。请从input中抽取出符合schema定义的关系三元组,不存在的关系返回空列表。请按照JSON字符串的格式回答。",
我们主要关注基于schema的信息抽取,因此必须在指令中显式指定schema。当然我们也正在探索不指定schema的开放抽取,预计OneKE2.0将支持这一功能。