Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/#18 multi prompt and inference notebooks #19

Merged
merged 4 commits into from Jul 17, 2023

Conversation

ohilikeit
Copy link
Contributor

Overview

Change Log

  • 학습시킨 모델과 대화를 통해 생성결과를 확인해볼 수 있는 주피터 노트북 추가
  • multi.json과 prompter.py를 적절히 수정

To Reviewer

  • 학습을 해보신 분들은 노트북 코드를 통해 대화해보세요.
  • openai api key와 huggingface token을 .env 파일에 넣어놔야합니다.

Issue Tags

@ohilikeit ohilikeit added the feature New feature or request label Jul 16, 2023
@ohilikeit ohilikeit self-assigned this Jul 16, 2023
@ohilikeit ohilikeit changed the base branch from main to develop July 16, 2023 08:31
@ohilikeit
Copy link
Contributor Author

pipeline에서 generation config를 설정할 때 repetition_penalty=1.05로 1에 가깝게 주는 게 좀 더 일관성있게 사용자의 발화에 대한 질문을 하는 답을 생성합니다.

pipe = pipeline(
    'text-generation',
    model = model,
    tokenizer = tokenizer,
    device=0,
    min_new_tokens=20,
    max_new_tokens=256,
    early_stopping=True,
    do_sample=True,
    eos_token_id=2,
    no_repeat_ngram_size=2,
    repetition_penalty=1.05,
    temperature=0.7,
    top_k=20,
    top_p=0.95,
)
이 부분의 인자를 조절해보는 실험도 진행해주십시오.

@ohilikeit ohilikeit merged commit 062e210 into develop Jul 17, 2023
@ohilikeit ohilikeit deleted the feat/#18-multi_prompt_and_inference_notebooks branch July 17, 2023 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] langchain retrieval의 input, output key 변경가능해짐에 따른 prompter.py와 템플릿 수정
1 participant