Comments (3)
타래에 언급해주신 것 처럼,
Instruction + Answer를 text
라는 하나의 컬럼으로 변경해주셔야 합니다!
이 부분은 다양한 Prompt를 추가할 수 있기 때문에 일부러 (각자 처리할 수 있도록) 비워둔 부분이었구요.
app.py 참고해서 json 형식을 {"text":"### 질문: 질문내용 ### 답변: 답변내용"} 형식으로 학습 진행
<== 이 방향이 제가 실제 학습을 진행한 방향입니다 :)
from koalpaca.
정확한 답변은 아니겠지만, 저도 비슷한 상황을 봉착했어서 내용 공유 드립니다.
run_clm.py
파일에서 tokenize_fuction을 보면 tokenization 과정에서 column_names[0]
값만을 사용하고 있습니다.
KoAlpaca_v1.1.jsonl
파일 같은 경우 column_names[0]
이 instruction
이므로 tokenzation 과정에서 instruction
값 만을 사용하게 됩니다.
저같은 경우 #31 이슈 참고해서
https://github.com/Beomi/easy-lm-trainer/blob/main/data/text_ko_alpaca_data.jsonl
파일 형식으로 전처리 후 학습했습니다.
tokenize_fuction을 수정하는 것도 하나의 방법 일 것 같습니다 ~
if training_args.do_train:
column_names = list(raw_datasets["train"].features)
else:
column_names = list(raw_datasets["validation"].features)
text_column_name = "text" if "text" in column_names else column_names[0]
# since this will be pickled to avoid _LazyModule error in Hasher force logger loading before tokenize_function
tok_logger = transformers.utils.logging.get_logger("transformers.tokenization_utils_base")
def tokenize_function(examples):
with CaptureLogger(tok_logger) as cl:
output = tokenizer(examples[text_column_name])
# clm input could be much much longer than block_size
if "Token indices sequence length is longer than the" in cl.out:
tok_logger.warning(
"^^^^^^^^^^^^^^^^ Please ignore the warning above - this long input will be chunked into smaller bits"
" before being passed to the model."
)
return output
from koalpaca.
답변 감사드립니다.
답변 참고해서 진행 하니까 학습이 잘 되었는데, 두가지를 변경 했습니다.
- app.py 참고해서 json 형식을 {"text":"### 질문: 질문내용 ### 답변: 답변내용"} 형식으로 학습 진행
- runpod.io에서 --fp16 파라미터로 진행할때 deepspeed에서 overflow! 메세지 나오면서 학습이 중단되는 증상이 생겨 --bf16 으로 변경하고 학습 진행.
2번은 아직 정확히 문제점이 뭐였는지 이해 하는건 아니나, 예상한대로 학습이 되네요 감사합니다.
from koalpaca.
Related Issues (20)
- LLaMa 30B, 65B token은 7B token 그대로 써도 되는건가요?? HOT 1
- 허깅 페이스의 TGI 이미지로 KoAlpaca-Polyglot-12.8B docker 컨테이너 생성하려고 하는데 오류가 발생됩니다. HOT 1
- chat-ui description 수정 HOT 1
- PEFT로LoRA로드 중에 에러
- decapoda-research/llama-13b-hf 모델이 사라졌습니다. HOT 1
- 학습한 LLM 모델이 말을 끝내지 않고 계속 생성합니다. HOT 5
- KoAlpaca polyglot 12.8b Fine-tuning 시 에러문의 드립니다. HOT 2
- KoAlpaca 모델 실행 예시코드 실행 중 용량 초과로 취소된 문제에 대해 문의드려요.
- ko-alpaca 1.0 데이터셋 관련 문의 HOT 1
- Few-shot 평가 문의
- index.json 파일 문의 드립니다 HOT 1
- beomi/KoAlpaca-Polyglot-12.8B 로 inference를 진행하기 위해서는 48GB의 VRAM이 필요한가요? HOT 3
- prompt 관련 ko_alpaca_data.json 형식 문의 드립니다. HOT 1
- 학습 결과 inference시 질문좀 드리겠습니다.! HOT 3
- 모델 저장 및 허깅페이스에 올리는법..이것때문에 문제가 생기네요 ㅠㅠ HOT 1
- 원하는 형태의 답변으로 고정시킬 수 있는 방법이 있을까요? HOT 4
- NSMC 결과 reproducing HOT 1
- 상업적 이용 가능 여부 관련 HOT 2
- 데모에 성능에 대해 질문있습니다. HOT 1
- Citation 관련 문의드립니다
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from koalpaca.