seongil-dn commited on
Commit
899c614
·
verified ·
1 Parent(s): 44a6aee

Add new SentenceTransformer model

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,1484 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - dataset_size:482743
8
+ - loss:MultipleNegativesRankingLoss
9
+ base_model: Alibaba-NLP/gte-multilingual-base
10
+ widget:
11
+ - source_sentence: 바르샤바 메커니즘은 별도의 어떤 것을 설치하는 것이 핵심일까
12
+ sentences:
13
+ - COP19에서 주목되는 것은 기후변화로 야기되는 개도국들의 손실과 피해에 관한 ‘바르샤바 메커니즘(Warsaw International Mechanism
14
+ for Loss and Damage Associated with Climate Change Impacts)’을 새로이 출범시키기로 합의한 점이다.
15
+ 이에 따라 2014년 개도국의 기후변화로 인한 ‘손실과 피해’ 의제에 대한 UN 차원의 논의가 더욱 강화될 전망이다. 개도국들이 적극적으로
16
+ 옹호하는 ‘손실과 피해’는 기후변화의 부정적 영향으로 인해 발생하는 자연재해와 같은 극한 기후현상 및 해수면 상승 등 서서히 발생하는 피해(slow-onset
17
+ event)를 의미한다. 바르샤바 메커니즘은 △개도국의 기후변화로 인한 손실과 피해에 대한 위험관리, △관련 기구와 조직, 이해관계자 간 연계,
18
+ △재원‧기술 지원 등의 역할을 하는 별도의 집행위원회를 설치하는 것이 핵심이다.
19
+ - 북한은 중앙집권적이고 폐쇄적인 사회이기 때문에 한국과 전면적인 사회문화교류를 진행하는 것이 체제유지 차원에서 큰 부담이었다. 이에 인도적 지원사업이나
20
+ 경제협력에 비하여 사회문화교류에 대해서는 소극적인 태도를 취했던 것이다. 또 북한은 정치적 성격이 짙은 사업이나 경제적 대가를 받을 수 있는
21
+ 사업을 우선시하는 경향이 있어, 실익이 크지 않은 이벤트성 사회문화 교류사업은 성사되기 어려운 환경이었다. 이러한 경험을 통해 지자체들은 2002년부터
22
+ 북한 당국이 필요로 하는 인도적 지원사업을 보다 적극적으로 추진하였다. 지자체 교류협력 초기 강원도와 제주 도가 추진한 인도적 지원 사업이
23
+ 성과를 낸 것도 이러한 방향전환에 일조하였다. 또한 2002년 지방선거로 새로이 출범한 광역단체장들이 남북교류협력에 적극 나서기 시작한 것도
24
+ 우호적인 환경이 되었다.
25
+ - 충남 보령시는 지난 29일 종합사회복지관에서 50가정이 참여한 가운데 자녀와 함께하는 우리가족 봄김장 담그기 행사를 개최했다고 밝혔다. 이번
26
+ 행사는 가족 TV 프로그램에 출연하여 천연 요리연구가로 명성이 높은 박상혜 요리연구가와 함께 우리 전통음식 김치의 영양학적 가치 및 김치 담그는
27
+ 법을 알아보는 시간을 가졌다. 이어 참여한 아동들이 카네이션 꽃과 마음의 편지를 부모님께 전달하는 등 5월 가정의 달을 맞아 가족의 소중함을
28
+ 일깨우는 시간도 마련됐다. 특히 체험에 함께하지 못한 주변 어려운 이웃 50가정에게 전달할 김치를 추가로 담아 나눔을 실천함으로써 참가자들이
29
+ 재능 기부의 주체가 되는 훈훈함도 선보였다. 이날 행사는 코로나19 방역 수칙을 철저히 준수하며 사회적거리 유지를 위해 오전, 오후 2회에
30
+ 걸쳐 25가정씩 진행했다. 행사에 참여한 최모씨는 "아이와 함께 담근 김장이라 더 맛있게 느껴질 것 같다"며 "가족간의 정도 쌓고 주변 이웃에게도
31
+ 나눌 수 있어 매우 뜻깊은 시간이었다"고 전했다. 김동일 시장은 "모두가 힘든 시기를 지내고 있는 요즘, 어려운 가정의 사소한 부분까지 세심하게
32
+ 채워줄 수 있는 좋은 프로그램을 지속적으로 개발하여 부모가 행복하고 아이 키우기 좋은 보령시를 만들겠다"고 말했다.
33
+ - source_sentence: 고등교육 재정을 무엇의 기준에서 살펴보면 교육비가 낮다는 문제점을 지적할 수 있지
34
+ sentences:
35
+ - 춤과 노래를 좋아하는 에너지 넘치는 은채는 식당을 운영하는 엄마의 돌봄을 거의 받지 못한다. 코로나19로 손님이 끊긴 엄마의 한숨과 스트레스는
36
+ 잔소리로 은채에게 쏟아진다. 매일 핀잔을 들은 은채는 답답한 현실을 도피하기 위해 친구들을 소집한다. 은채와 비슷한 고민을 하는 친구들은 어릴
37
+ 적 가족들과 행복했던 추억의 순간을 기억하며 무작정 바다를 찾아 떠난다. 하지만 바다를 찾아가는 과정이 순탄치만은 않다. 광주에서 최초로 어린이들이
38
+ 직접 주인공으로 참여한 독립영화 '바다로 간 아이들' 이 제작을 마치고 시사회를 갖는다. 영화는 지역의 문화예술교육 전문 단체인 문화공동체
39
+ 아우름이 주관 운영하고 있는 사회공헌 문화예술교육 프로젝트 '기아챌린지 어린이 뮤지컬' 팀의 2020년 교육프로그램 �� 하나로 제작됐다. 기아자동차
40
+ 광주공장과 초록우산은 후원자로 나섰다. '기아챌린지 어린이 뮤지컬' 팀은 2016년에 창단됐다. 광주지역아동센터에 소속된 어린이들 중 춤,
41
+ 노래, 연기 등 예술재능이 뛰어난 어린이들을 매년 모집해 운영된다. 기아챌린지 어린이 뮤지컬 팀은 창단된 해인 2016년, 창작뮤지컬 '그래도
42
+ 괜찮아'를 선보인바 있으며, 2019년에는 창작뮤지컬 '내가 가는 길'을 무대에 올려 호평을 받았다. 올해에도 새로운 창작뮤지컬을 목표로 지난해부터
43
+ 준비해 왔으나 코로나19로 인해 매주 모여서 연습할 수 없는 상황이 연속됐다. 제작진과 출연진들은 화상회의 어플인 '줌'을 통해 각자 춤과
44
+ 노래, 연기 합을 맞췄다. 시간이 흐를수록 집중력이 떨어지고 무엇보다 춤과 관련된 동작은 완벽하게 합을 맞추는 것이 불가능했다. 온라인 교육의
45
+ 한계를 극복할 수 있는 방안을 고민하던 제작진과 출연진들은 대안으로 영화제작을 떠올렸다. 영화 배역에 따른 모든 과정은 온라인으로 교육받을
46
+ 수 있었다. 영화제작은 지역에서 오랫동안 독립영화를 제작 배급해 온 '필름에이지' 가 맡았다. 코로나 시대 어린이들이 맞닥뜨린 현실과 그에
47
+ 대한 여러 가지 감정들을 출연진들과 직접 소통하면서 성장드라마 형식의 독립영화 '바다로 간 아이들'이 완성됐다. 영화 '바다로 간 아이들'은
48
+ 한 번도 경험해 보지 못한 새로운 일상에 모두가 지쳐가고 있는 현 시대를 그대로 보여준다. 특히 학교에 가지 못하고 집에서 고립된 우리 아이들,
49
+ 집중력이 떨어지는 온라인 수업과 넘쳐나는 에너지를 분출 할 수 없는 답답함에 힘들어 하는 미래 세대들의 목소리에 귀를 기울이고 있다. 필름에이지
50
+ 윤수안 감독과 제작진은 어린이들과 직접 만나 코로나 시대를 보내는 어린이들의 일상과 감정들을 스토리텔링 했고 그 내용을 바탕으로 시나리오를
51
+ 완성했다. 특히 영화에 출연하는 어린이들의 예술적 에너지를 표출할 수 있는 뮤직비디오 형식의 댄스가 영화에 가미돼 완성도를 높였다. 영화는
52
+ 오는 23일 오후3시 광주독립영화관에서 시사회를 통해 관계자들에 첫 선을 보일 예정이다. 이후 공식적인 극장 배급을 통해 관객들에게 찾아간다.
53
+ 향후 국내 영화제에도 출품될 계획이다.
54
+ - 고등교육 재정 지원 정책을 진단하는 준거로 충족성, 안정성, 자율성, 합리성 등(서영인 외, 2017)을 사용해 고등교육 재정의 문제점을 살펴보면
55
+ 다음과 같다. 첫째, 충족성의 기준에서 고등교육 재정을 살펴보면, 우선 낮은 교육비의 문제점을 들 수 있다. 2017년 조사된 OECD 대학생
56
+ 1인당 교육비 자료를 보면, 복지국가인 북유럽이나 우리와 마찬가지로 고등교육비용의 수익자부담 원칙이 강한 영국, 미국, 일본의 1인당 교육비는
57
+ 약 2만불 이상(일본은 $18,022)으로 매우 높으나 한국은 $9,570으로 평균 이하의 매우 낮은 그룹에 속해 있는 것을 알 수 있다.
58
+ 고등교육에 대한 투자가 교육경쟁력은 물론 국가의 경제 발전을 선도할 수 있는 필수조건임을 고려할 때 고등교육 재정에 대한 투자의 확대가 필요하다.
59
+ - 청와대가 유효일 국방차관의 5.18 행적논란과 관련해 극히 신중한 자세를 보이고 있다. 5.18 관련 시민단체와 민주당에 이어 열린우리당내
60
+ 일부 호남 의원이 유 차관경질을 요구하고 나섰지만, 국방부 조사 결과를 지켜보고 판단하겠다는 기존 입장에서 크게 달라진 것은 없다. 청와대는
61
+ 특히 유 차관 행적에 대한 국방부 조사결과가 나와도 노무현대통령에 대한 별도 보고가 없을 것이란 입장을 밝히고 나서 주목된다. 청와대 고위관계자는
62
+ 26일 연합뉴스와 통화에서 "조사 결과가 나와도 대통령에게 보고할 성질이 아니라고 본다"며 "비서실장과 민정수석, 인사수석 등이 내용을정확히
63
+ 확인하고 판단을 내릴 것"이라고 말했다. 이 관계자는 또 일부 언론에서 거론하고 있는 유 차관 거취 문제에 대해 "청와대에선 전혀 검토한 적이
64
+ 없다"며 "논의할 단계도 아니다"고 말했다. 한 핵심관계자는 "유 차관의 과거 행적과 관련해 만일 특별한 내용이 있다면 서면보고가 이뤄질지
65
+ 몰라도 소관 장관이 대통령에게 직접 보고할 가능성은 없을 것 같다"고 말했다. 청와대가 이처럼 유 차관 문제에 대해 신중한 자세를 견지하고
66
+ 있는 것은 5.18당시 광주지역에 투입된 20사단 소속 대대장이었던 유 차관의 예하 부대가 시민군과충돌하거나 인명살상 등 진압작전을 직접 수행했다는
67
+ 명백한 증거가 아직 나오지 않다는 점이 감안된 것으로 알려졌다. 특히 이런 상황에서 청와대가 직접 나서 유 차관에 대한 거취 문제를 거론할
68
+ 경우 공직사회, 특히 군이 심리적으로 동요할 수 있다는 점도 작용한 것으로 보인다. 한 관계자는 "시민단체가 요구한다고 해서 이미 검찰 조사에서
69
+ 문제가 없는 것으로 판단이 내려진 사안을 갖고 섣불리 한 부처의 차관을 경질한다면 공직사회의지휘체계가 동요할 수 밖에 없다"고 말했다.
70
+ - source_sentence: DCM 벅 변환기는 모바일 기기에 적용되며 이를 제작한 공정은 무엇이지?
71
+ sentences:
72
+ - 오리엔탈정공(014940)은 상한가를 기록하고 있다. 동종목은 현재 1,445원선에서 이루어지고 있다. 참고로 52주 최고가는 2,545원(17년
73
+ 05월 02일), 최저가는 960원(17년 12월 22일)원이다. 최근 3일동안 평균 거래량은 234만 주이다. 이는 250일 일 평균 거래량
74
+ 80만 주와 비교해보면 최근 거래량이 급격히 늘어났다는 것을 알 수 있다. 외국인과 기관은 순매도, 개인은 순매수(한달누적) 전일까지 외국인이
75
+ 4일 연속, 기관이 11일 연속 각각 동종목을 순매도 했다. 4주간을 기준으로 보면 외국인이 매도 우위를 지속하면서 41,454주를 순매도했고,
76
+ 기관도 매도 관점으로 접근하면서 218주를 순매도했지만, 개인은 오히려 순매수량을 늘리며 41,672주를 순매수했다. 외국인, 기관 모두 보유량
77
+ 감소 (5일 누적) 최근 5일간 동종목의 외국인 투자자는 13,169주 순매도하였고 마찬가지로 기관은 4주 순매도하였다. 전날 두 주체 각각
78
+ 7,143주, 4주 순매도하며 보유 비율을 줄였다. 다음 표는 동종목의 외국인, 기관의 일별 순매수량을 나타낸 것이다. fnRASSI는 증권전문
79
+ 기업 씽크풀과 파이낸셜뉴스의 협업으로 로봇기자가 실시간으로 생산하는 기사입니다.
80
+ - '산업부, 글로벌전문기술개발사업에 1,565억원 지원
81
+
82
+ □ 산업통상자원부(장관 윤상직)는 국내 중소․중견기업의 기술경쟁력 강화를 통해 글로벌전문기업으로 육성하기 위한 ‘2014년도 글로벌 전문기술개발사업(주력
83
+ 및 신산업)‘의 신규 지원계획을 공고함
84
+
85
+ ㅇ 동 사업은 글로벌 기술경쟁력을 보유한 우수 중소·중견기업을육성하는 산업부의 대표 R&D사업으로, 지원 규모는 과제 특성에따라 최대 5년
86
+ 이내에서 매년 2~10억원 규모임 □ 2014년 글로벌전문기술개발사업(주력 및 신산업) 지원 예산 1,565억원 중 금번 신규 지원 공고대상은
87
+ 5개 내역사업, 413억원 규모임
88
+
89
+ ㅇ 섬유생활스트림, 해양레저장비, 개인용이동수단, 청정생산기반 등 4개 사업의 신규 예산은 223억원으로,
90
+
91
+ - 품목지정형 과제* 32개에 153.29억원을 지원하며,
92
+
93
+ * 품목 : 단위 기술이 아닌 ‘주요 성능을 포함한 제품 혹은 제품군’을 의미
94
+
95
+ - (예) 고기능성 친환경 벽지제품, 휴대용 접이식 전기자전거, 등
96
+
97
+ * 품목지정형 과제수 : 섬유생활스트림 25개, 해양레저장비 2개, 개인용 이동수단 2개, 청정생산기반 3개
98
+
99
+ - 자유공모형 과제는 섬유생활스트림, 해양레저장비, 청정생산기반 등 3개 사업에서 69.67억원을 지원함
100
+
101
+ ㅇ 우수기술연구센터(ATC) 사업은 자유공모형 과제를 지원하며, 우수 중소·중견기업 부설연구소 40개 내외를 선정하여 190억원을 지원함'
102
+ - <h1>요 약</h1><p>본 논문에서 모바일 기기에 적용하는 DCM DC-DC 벅 변환기를 설계하였다. 이 변환기는 안정된 동작을 위한 보상기,
103
+ PWM 로직과 파워 스위치로 구성되어 있다. 작은 하드웨어 폼-팩터를 얻기 위하여 칩 외부에서 사용하는 소자의 갯수를 최소화하여야 하며 이는
104
+ 효율적인 주파수 보상과 디지털 스타트-업 회로로 구현하였다. 매우 작은 부하 전류에서 효율의 감소를 막기 위하여 버스트-모드 동작도 구현하였다.
105
+ DCM 벅 변환기는 0.18um BCDMOS 공정으로 제작되었다. \ ( 2.8 \sim 5 \mathrm{V} \) 의 입력 전압 범위에
106
+ 대하여 출력 전압 값은 외부 저항 소자를 사용하여 \( 1.8 \mathrm{V} \) 로 프로그램 되었다. \ ( 1 \mathrm{MHz}
107
+ \) 의 스위칭 주파수 및 \( 100 \mathrm{mA} \) 의 부하 전류에서 측정된 최대 효율은 \( 92.6 \% \) 이다. </p>
108
+ - source_sentence: 생활안전지도 이벤트는 6월 28일부터 몇 개월간 진행할 계획이니
109
+ sentences:
110
+ - '내 주변 안전은 생활안전지도에서 확인하세요. - 올 상반기 서비스 이용률 전년대비 2.5배 상승, 6.28일부터 퀴즈 이벤트 실시 -
111
+
112
+ □ 행정안전부(장관 김부겸)는 생활안전지도를 통해 범죄 발생현황, 교통사고 발생현황, 대피시설 정보, 미세먼지 등 각종 내 주변의 안전정보를
113
+ 한 곳에 모아 알기 쉬운 지도형태로 정보(239종)를 제공하고 있다. ○ 특히, 생활안전지도에서는 등·하굣길·출근길 교통사고 주의구간, 우리
114
+ 동네 안전한 대피소, 안전 녹색길, 어린이 안전지도, 여성밤길 및 노인 안전지도 등을 내 위치 기반으로 쉽게 확인할 수 있다. □ 또한, 공공·민간분야
115
+ 설문조사, 발전방안에 대한 전문가 의견수렴, 공동이용 협의회 운영을 통한 서비스 개선방안을 모색하고 있다. ○ 생활안전지도 누리집(safemap.go.kr)을
116
+ 통해 서비스 이용 현황을 공개하고, 안전정보의 공개 근거 마련을 위해 재난 및 안전관리 기본법 개정안을 입법예고 중에 있다. ○ 앞으로, 생활안전지도
117
+ 정보를 학교안전교육에 활용할 수 있도록 지도교사용 안전교육 안내서도 마련하여 제공할 계획이다. □ 유용한 생활안전지도 정보를 보다 많은 국민들이
118
+ 이용할 수 있도록 서비스를 널리 알리기 위해 ‘생활안전지도 퀴즈 이벤트’를 6월 28일 부터 4개월 동안 진행할 계획이다.'
119
+ - 33살에 임원 38살에 최고경영자 국내 재벌그룹에서 경영권 승계가 진행 중이거나 최근에 끝난 재벌총수 3~4세들이 처음 임원이 되는 나이는
120
+ 평균 33살, 사장이나 회장 등 최고경영자의 지위에 오르는 나이는 평균 38살로 조사됐다. 또 이들 재벌 3~4세들이 입사해 최고경영자가 되는
121
+ 데 걸리는 기간은 평균 11년 정도인 것으로 나타났다. 최근 일부 그룹 총수 일가의 초고속 승진이 사회적으로 주목을 받고 있는 가운데, 에서
122
+ 경영승계가 진행되고 있거나 최근에 끝난 삼성, 엘지, 현대·기아차, 에스케이, 한진, 롯데, 두산, 신세계, 씨제이, 효성, 코오롱, 현대백화점
123
+ 등 12개 주요 그룹의 재벌총수 3~4세(한진·롯데는 2세) 36명을 대상으로 경영승계 실태를 조사했더니 이렇게 나타났다. 조상 대상은 삼성에선
124
+ 이재용 삼성전자 상무 등 5명, 엘지는 구본걸 엘지상사 부사장 등 3명, 현대·기아차는 정의선 기아차 사장 등 4명, 에스케이는 최태원 에스케이㈜
125
+ 회장 등 4명, 한진은 조양호 회장 등 4명, 롯데는 신동빈 부회장, 두산은 박정원 ㈜두산 사장 등 5명, 신세계는 정용진 부사장 등 2명,
126
+ 씨제이는 이재현 회장 등 2명, 효성은 조현준 부사장 등 3명, 코오롱은 이웅렬 회장, 현대백화점은 정지선 부회장 등 2명이다. 12개 그룹
127
+ 총수 3~4세 36명 조사 입사 11년만에 최고경영자 ‥ “능력검증 필요” 조사 결과, 재벌 3~4세들은 평균 27.3살에 계열사에 입사한
128
+ 뒤, 32.8살에 처음 임원에 임명됐다. 임원이 되는 데 걸린 기간은 평균 5.5년이었다. 재벌 3~4세 중에서 이미 사장 이상 직급(회장,
129
+ 부회장 포함)을 맡고 있거나, 직급은 이에 못미치지만 대표이사를 맡아 사실상 최고경영자 노릇을 하고 있는 17명이 최고경영자에 오른 나이는
130
+ 평균 38.2살이었다. 최고경영자 지위까지 오르는 데 걸린 기간은 입사 시점을 기준으로 하면 10.8년, 첫 임원 임명을 기준으로 하면 6.4년이었다.
131
+ 또 삼성 이건희 회장과 엘지 구본무 회장, 현대·기아차의 정몽구 회장, 한화의 김승연 회장, 금호아시아나의 박삼구 회장, 두산의 박용오·용성
132
+ 회장, 효성의 조석래 회장 등 주요 그룹의 현직 재벌총수 8명은 평균 28.2살에 계열사에 들어온 뒤, 30.2살에 임원으로 승진하고, 37.5살에
133
+ 최고경영자에 선임된 것으로 나타났다. 재벌 3~4세들과 현직 재벌총수들을 비교하면, 임원 승진 나이는 2년 정도 늦어졌으나, 최고경영자로 선임되는
134
+ 나이는 비슷하다. 정광선 한국기업지배구조 개선지원센터 원장(중앙대 교수)은 “재벌총수 일가의 초고속 승진과 조급한 경영승계는 기업을 위험에
135
+ 빠뜨릴 수 있는 만큼 충분한 경영수업과 경영능력에 대한 객관적 검증이 필요하다”고 말했다. 곽정수 대기업전문기자
136
+ - '국회미래연구원 EPTA(유럽의회 기술영향평가) 네트워크 가입
137
+
138
+ ■ EPTA 가입의 의의
139
+
140
+ EPTA는 유럽 각국의 의회 중심으로 신기술에 관한 자문을 제공하는 기술영향평가 기관 네트워크로서 올해의 의장국인 스웨덴을 비롯하여 유럽의
141
+ 12개국(Full member) 및 미국을 비롯한 유럽 이외의 10개(Associate Member)의 국가가 참여하고 있다. 유럽 이외의
142
+ 국가의 경우 Full Membership이 부여되지 않는다. EPTA는 과학기술의 발달이 사회에 미치는 영향을 사전에 예측하고 대응함으로써,
143
+ 긍정적인 효과를 극대화하고 부정적인 영향을 최소화하는 목적이 있으며 공동의 아젠다를 확정하고 연구를 진행함으로써 글로벌 이슈에 대한 각국의
144
+ 상세 연구결과를 공유하고 있다. 기술영향평가는 1970년대 미국에서 과학기술을 연구자, 관련 전문가 및 국민이 참여하는 민주적 평가 방식을
145
+ 통해 기술의 발전에 선제적으로 대응하기 위해 실시되었다. 미국은 1974년 OTA(Office of Technology Assessment)를
146
+ 두고 전문가 중심의 기술영향 평가를 시행하였으며, 1995년 OTA가 폐지된 후 현재는GAO(Government Accountability
147
+ Office)에서 맡아 운영되고 있다. 유럽의 경우 유럽 최초의 공식적인 기술영향평가 기관으로 1983년 프랑스의OPECST(Office Parlementaire
148
+ d’Evaluation des Choix Scientifique Technologie)를 시작으로 영국, 네덜란드, 덴마크, 독일, 스위스
149
+ 등 유럽 각국에서 다양한 형태와 방법으로 기술영향평가를 도입하여 수행되고 있다. EPTA는 1990년에 설립되어 다양한 주제에 대한 유럽 각국의
150
+ 기술영향평가 결과를 공유하고 이를 통해 유럽의회에 의견을 개진함으로써, 관련 법령 제정 및 정책 추진에 있어서 중요한 방향을 제시하고 있다.
151
+ 지난 10월 10-11일 스웨덴 의회에서 개최된 EPTA 컨퍼런스에서는 “Technologies in care for older people”을
152
+ 주제로 유럽뿐만 아니라 미국을 비롯한 다양한 국가에서 관련 내용을 발표하였다. 특히, 일본에서는 노인을 지원하는 다양한 로봇의 실물과 사진
153
+ 전시를 통해 초고령사회로 들어선 일본의 노인 지원을 위한 다양한 기술의 진보를보여주었다.'
154
+ - source_sentence: LPGA 투어에서 고진영이 컷 탈락을 기록한 건 얼마나 돼
155
+ sentences:
156
+ - '1회용품 함께 줄이기 계획
157
+
158
+ Ⅰ. 추진 배경
159
+
160
+ □ (그간 추진 경과) ‘자원의 절약 및 재활용 촉진에 관한 법률’에 따라 1회용품 사용억제 제도 운영(1994~, 18개품목-18개업종)
161
+
162
+ o (성과) 「재활용 폐기물 관리 종합대책」(2018.5)을 수립하고 1회용컵, 비닐봉투 사용저감을 집중 추진하여 일정 감축성과 창출
163
+
164
+ * 커피전문점 매장 내 1회용컵 75% 감소, 제과점 1회용 비닐봉투 84% 감소 등
165
+
166
+ o (한계) 그러나 국민이 체감할 변화는 아직 미흡하며, 비 규제 품목(빨대 등) 및 유형(배달 등)에 대한 관리 강화 요구 증가
167
+
168
+ □ (해외 동향) 세계 각 국은 1회용품 사용을 저감하기 위한 중장기 로드맵을 발표하고, 국가별로 다양한 규제방안 도입
169
+
170
+ * EU는 1회용 플라스틱 10대 품목 선정, 품목별 시장출시 금지 등 규제방안 마련
171
+
172
+ ** 미국 일부 州, 캐나다, 프랑스, 케냐, 칠레 등 1회용 비닐봉투 등 사용금지 도입'
173
+ - 노인에게 적절한 일자리를 제공하는 것을 목적으로 하는 노인의 경제 활동 지원 정책은 고용과 복지로 이원화되어 진행된다는 전달체계상의 문제가
174
+ 있으며, 다른 영역에 비하여 노인일자리사업의 불충분성(수요는 현재 공급량에 비해 약 4배 이상)이 크다. 더불어 사업 대상의 욕구와 사업 구조의
175
+ 불일치성이 큰데, 이는 지금까지의 관련 정책이 공공 영역 중심으로 이루어졌다는 점이 주요 원인 중 하나이다. 활기찬 노후 생활을 영위할 수
176
+ 있도록 지원하는 노인 여가활동 지원 정책은 정책의 발달 단계상 다른 영역에 비하여 충분성이 매우 낮은 수준이다. 즉, 다양한 여가활동에서의
177
+ 미충족 욕구가 발생하고 있다. 그러나 이러한 불충분성의 문제는 공적 영역만으로는 해결될 수 없다. 또한 노인의 다양성 증대에 따라서 현재 공적
178
+ 영역 정책이 다양한 여가활동 욕구를 충족시키지 못하고 있는 상황이다. 또한 형평성이라는 관점에서 볼 때 형평성이 낮은 인프라 분포로 인하여
179
+ 지역별 형평성의 문제가 있으며, 실질적인 서비스 이용에 있어 성별 차이와 소득수준별 차이가 매우 큰 상황이다.
180
+ - 여자골프 세계랭킹 1위 고진영(26)이 미국여자프로골프(LPGA) 투어 드라이브온 챔피언십(총상금 150만 달러)에서 컷 탈락했다. 고진영은
181
+ 6일(한국시간) 미국 플로리다주 오칼라의 골든 오칼라 골프 클럽(파72ㆍ6,526야드)에서 열린 대회 2라운드에서 버디와 보기 하나씩을 묶어
182
+ 이븐파 72타를 쳤다. 1라운드 3오버파 75타로 공동 86위에 그쳤던 고진영은 이틀간 합계 3오버파 147타로 공동 72위에 머물러 컷을
183
+ 통과하지 못했다. 컷은 2오버파 146타였다. 고진영이 LPGA 투어 대회에서 컷 탈락한 건 세 번째다. 앞서 2017년 3월 ANA 인스피레이션,
184
+ 2018년 8월 브리티시여자오픈에서 컷을 통과하지 못했다. 그리고 2년 7개월 만에 또 한 번 컷 탈락이 기록됐다. 이날 2라운드는 10번
185
+ 홀에서 시작, 15번 홀(파3) 버디를 잡아냈으나 17번 홀(파4) 보기를 써내 전반 타수를 줄이지 못했고, 후반엔 9개 홀 모두 파를 기록했다.
186
+ 그는 이날 페어웨이는 한 번밖에 놓치지 않았으나 그린을 6차례 놓치고 퍼트 수가 30개에 달했다. 리더보드 맨 위엔 10언더파 134타의 제니퍼
187
+ 컵초, 오스틴 언스트(이상 미국)가 이름을 올린 가운데 데일리 베스트인 7언더파를 몰아친 카를로타 시간다(스페인ㆍ8언더파 136타)가 두 타
188
+ 차로 추격했다. 한국 선수 중에는 허미정(32)이 3언더파 141타, 공동 11위로 가장 좋은 성적을 냈다. 세계랭킹 2위 김세영(28)은
189
+ 공동 17위(2언더파 142타), 전인지(27)는 공동 24위(1언더파 143타)에 자리했다. 정은(25)은 5타, 박성현(28)은 한 타를
190
+ 잃고 공동 58위(2오버파 146타)에 올라 가까스로 컷을 통과했다.
191
+ pipeline_tag: sentence-similarity
192
+ library_name: sentence-transformers
193
+ ---
194
+
195
+ # SentenceTransformer based on Alibaba-NLP/gte-multilingual-base
196
+
197
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Alibaba-NLP/gte-multilingual-base](https://huggingface.co/Alibaba-NLP/gte-multilingual-base). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
198
+
199
+ ## Model Details
200
+
201
+ ### Model Description
202
+ - **Model Type:** Sentence Transformer
203
+ - **Base model:** [Alibaba-NLP/gte-multilingual-base](https://huggingface.co/Alibaba-NLP/gte-multilingual-base) <!-- at revision 7fc06782350c1a83f88b15dd4b38ef853d3b8503 -->
204
+ - **Maximum Sequence Length:** 512 tokens
205
+ - **Output Dimensionality:** 768 tokens
206
+ - **Similarity Function:** Cosine Similarity
207
+ <!-- - **Training Dataset:** Unknown -->
208
+ <!-- - **Language:** Unknown -->
209
+ <!-- - **License:** Unknown -->
210
+
211
+ ### Model Sources
212
+
213
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
214
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
215
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
216
+
217
+ ### Full Model Architecture
218
+
219
+ ```
220
+ SentenceTransformer(
221
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: NewModel
222
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
223
+ (2): Normalize()
224
+ )
225
+ ```
226
+
227
+ ## Usage
228
+
229
+ ### Direct Usage (Sentence Transformers)
230
+
231
+ First install the Sentence Transformers library:
232
+
233
+ ```bash
234
+ pip install -U sentence-transformers
235
+ ```
236
+
237
+ Then you can load this model and run inference.
238
+ ```python
239
+ from sentence_transformers import SentenceTransformer
240
+
241
+ # Download from the 🤗 Hub
242
+ model = SentenceTransformer("seongil-dn/gte-noneg-bs512-lr5e-5-1000")
243
+ # Run inference
244
+ sentences = [
245
+ 'LPGA 투어에서 고진영이 컷 탈락을 기록한 건 얼마나 돼',
246
+ '여자골프 세계랭킹 1위 고진영(26)이 미국여자프로골프(LPGA) 투어 드라이브온 챔피언십(총상금 150만 달러)에서 컷 탈락했다. 고진영은 6일(한국시간) 미국 플로리다주 오칼라의 골든 오칼라 골프 클럽(파72ㆍ6,526야드)에서 열린 대회 2라운드에서 버디와 보기 하나씩을 묶어 이븐파 72타를 쳤다. 1라운드 3오버파 75타로 공동 86위에 그쳤던 고진영은 이틀간 합계 3오버파 147타로 공동 72위에 머물러 컷을 통과하지 못했다. 컷은 2오버파 146타였다. 고진영이 LPGA 투어 대회에서 컷 탈락한 건 세 번째다. 앞서 2017년 3월 ANA 인스피레이션, 2018년 8월 브리티시여자오픈에서 컷을 통과하지 못했다. 그리고 2년 7개월 만에 또 한 번 컷 탈락이 기록됐다. 이날 2라운드는 10번 홀에서 시작, 15번 홀(파3) 버디를 잡아냈으나 17번 홀(파4) 보기를 써내 전반 타수를 줄이지 못했고, 후반엔 9개 홀 모두 파를 기록했다. 그는 이날 페어웨이는 한 번밖에 놓치지 않았으나 그린을 6차례 놓치고 퍼트 수가 30개에 달했다. 리더보드 맨 위엔 10언더파 134타의 제니퍼 컵초, 오스틴 언스트(이상 미국)가 이름을 올린 가운데 데일리 베스트인 7언더파를 몰아친 카를로타 시간다(스페인ㆍ8언더파 136타)가 두 타 차로 추격했다. 한국 선수 중에는 허미정(32)이 3언더파 141타, 공동 11위로 가장 좋은 성적을 냈다. 세계랭킹 2위 김세영(28)은 공동 17위(2언더파 142타), 전인지(27)는 공동 24위(1언더파 143타)에 자리했다. 정은(25)은 5타, 박성현(28)은 한 타를 잃고 공동 58위(2오버파 146타)에 올라 가까스로 컷을 통과했다.',
247
+ '1회용품 함께 줄이기 계획\nⅠ. 추진 배경\n□ (그간 추진 경과) ‘자원의 절약 및 재활용 촉진에 관한 법률’에 따라 1회용품 사용억제 제도 운영(1994~, 18개품목-18개업종)\no (성과) 「재활용 폐기물 관리 종합대책」(2018.5)을 수립하고 1회용컵, 비닐봉투 사용저감을 집중 추진하여 일정 감축성과 창출\n* 커피전문점 매장 내 1회용컵 75% 감소, 제과점 1회용 비닐봉투 84% 감소 등\no (한계) 그러나 국민이 체감할 변화는 아직 미흡하며, 비 규제 품목(빨대 등) 및 유형(배달 등)에 대한 관리 강화 요구 증가\n□ (해외 동향) 세계 각 국은 1회용품 사용을 저감하기 위한 중장기 로드맵을 발표하고, 국가별로 다양한 규제방안 도입\n* EU는 1회용 플라스틱 10대 품목 선정, 품목별 시장출시 금지 등 규제방안 마련\n** 미국 일부 州, 캐나다, 프랑스, 케냐, 칠레 등 1회용 비닐봉투 등 사용금지 도입',
248
+ ]
249
+ embeddings = model.encode(sentences)
250
+ print(embeddings.shape)
251
+ # [3, 768]
252
+
253
+ # Get the similarity scores for the embeddings
254
+ similarities = model.similarity(embeddings, embeddings)
255
+ print(similarities.shape)
256
+ # [3, 3]
257
+ ```
258
+
259
+ <!--
260
+ ### Direct Usage (Transformers)
261
+
262
+ <details><summary>Click to see the direct usage in Transformers</summary>
263
+
264
+ </details>
265
+ -->
266
+
267
+ <!--
268
+ ### Downstream Usage (Sentence Transformers)
269
+
270
+ You can finetune this model on your own dataset.
271
+
272
+ <details><summary>Click to expand</summary>
273
+
274
+ </details>
275
+ -->
276
+
277
+ <!--
278
+ ### Out-of-Scope Use
279
+
280
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
281
+ -->
282
+
283
+ <!--
284
+ ## Bias, Risks and Limitations
285
+
286
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
287
+ -->
288
+
289
+ <!--
290
+ ### Recommendations
291
+
292
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
293
+ -->
294
+
295
+ ## Training Details
296
+
297
+ ### Training Hyperparameters
298
+ #### Non-Default Hyperparameters
299
+
300
+ - `per_device_train_batch_size`: 128
301
+ - `per_device_eval_batch_size`: 128
302
+ - `warmup_steps`: 100
303
+ - `bf16`: True
304
+
305
+ #### All Hyperparameters
306
+ <details><summary>Click to expand</summary>
307
+
308
+ - `overwrite_output_dir`: False
309
+ - `do_predict`: False
310
+ - `eval_strategy`: no
311
+ - `prediction_loss_only`: True
312
+ - `per_device_train_batch_size`: 128
313
+ - `per_device_eval_batch_size`: 128
314
+ - `per_gpu_train_batch_size`: None
315
+ - `per_gpu_eval_batch_size`: None
316
+ - `gradient_accumulation_steps`: 1
317
+ - `eval_accumulation_steps`: None
318
+ - `torch_empty_cache_steps`: None
319
+ - `learning_rate`: 5e-05
320
+ - `weight_decay`: 0.0
321
+ - `adam_beta1`: 0.9
322
+ - `adam_beta2`: 0.999
323
+ - `adam_epsilon`: 1e-08
324
+ - `max_grad_norm`: 1.0
325
+ - `num_train_epochs`: 3
326
+ - `max_steps`: -1
327
+ - `lr_scheduler_type`: linear
328
+ - `lr_scheduler_kwargs`: {}
329
+ - `warmup_ratio`: 0.0
330
+ - `warmup_steps`: 100
331
+ - `log_level`: passive
332
+ - `log_level_replica`: warning
333
+ - `log_on_each_node`: True
334
+ - `logging_nan_inf_filter`: True
335
+ - `save_safetensors`: True
336
+ - `save_on_each_node`: False
337
+ - `save_only_model`: False
338
+ - `restore_callback_states_from_checkpoint`: False
339
+ - `no_cuda`: False
340
+ - `use_cpu`: False
341
+ - `use_mps_device`: False
342
+ - `seed`: 42
343
+ - `data_seed`: None
344
+ - `jit_mode_eval`: False
345
+ - `use_ipex`: False
346
+ - `bf16`: True
347
+ - `fp16`: False
348
+ - `fp16_opt_level`: O1
349
+ - `half_precision_backend`: auto
350
+ - `bf16_full_eval`: False
351
+ - `fp16_full_eval`: False
352
+ - `tf32`: None
353
+ - `local_rank`: 0
354
+ - `ddp_backend`: None
355
+ - `tpu_num_cores`: None
356
+ - `tpu_metrics_debug`: False
357
+ - `debug`: []
358
+ - `dataloader_drop_last`: True
359
+ - `dataloader_num_workers`: 0
360
+ - `dataloader_prefetch_factor`: None
361
+ - `past_index`: -1
362
+ - `disable_tqdm`: False
363
+ - `remove_unused_columns`: True
364
+ - `label_names`: None
365
+ - `load_best_model_at_end`: False
366
+ - `ignore_data_skip`: False
367
+ - `fsdp`: []
368
+ - `fsdp_min_num_params`: 0
369
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
370
+ - `fsdp_transformer_layer_cls_to_wrap`: None
371
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
372
+ - `deepspeed`: None
373
+ - `label_smoothing_factor`: 0.0
374
+ - `optim`: adamw_torch
375
+ - `optim_args`: None
376
+ - `adafactor`: False
377
+ - `group_by_length`: False
378
+ - `length_column_name`: length
379
+ - `ddp_find_unused_parameters`: None
380
+ - `ddp_bucket_cap_mb`: None
381
+ - `ddp_broadcast_buffers`: False
382
+ - `dataloader_pin_memory`: True
383
+ - `dataloader_persistent_workers`: False
384
+ - `skip_memory_metrics`: True
385
+ - `use_legacy_prediction_loop`: False
386
+ - `push_to_hub`: False
387
+ - `resume_from_checkpoint`: None
388
+ - `hub_model_id`: None
389
+ - `hub_strategy`: every_save
390
+ - `hub_private_repo`: False
391
+ - `hub_always_push`: False
392
+ - `gradient_checkpointing`: False
393
+ - `gradient_checkpointing_kwargs`: None
394
+ - `include_inputs_for_metrics`: False
395
+ - `eval_do_concat_batches`: True
396
+ - `fp16_backend`: auto
397
+ - `push_to_hub_model_id`: None
398
+ - `push_to_hub_organization`: None
399
+ - `mp_parameters`:
400
+ - `auto_find_batch_size`: False
401
+ - `full_determinism`: False
402
+ - `torchdynamo`: None
403
+ - `ray_scope`: last
404
+ - `ddp_timeout`: 1800
405
+ - `torch_compile`: False
406
+ - `torch_compile_backend`: None
407
+ - `torch_compile_mode`: None
408
+ - `dispatch_batches`: None
409
+ - `split_batches`: None
410
+ - `include_tokens_per_second`: False
411
+ - `include_num_input_tokens_seen`: False
412
+ - `neftune_noise_alpha`: None
413
+ - `optim_target_modules`: None
414
+ - `batch_eval_metrics`: False
415
+ - `eval_on_start`: False
416
+ - `eval_use_gather_object`: False
417
+ - `batch_sampler`: batch_sampler
418
+ - `multi_dataset_batch_sampler`: proportional
419
+
420
+ </details>
421
+
422
+ ### Training Logs
423
+ <details><summary>Click to expand</summary>
424
+
425
+ | Epoch | Step | Training Loss |
426
+ |:------:|:----:|:-------------:|
427
+ | 0.0011 | 1 | 0.4348 |
428
+ | 0.0021 | 2 | 0.4712 |
429
+ | 0.0032 | 3 | 0.4947 |
430
+ | 0.0042 | 4 | 0.4267 |
431
+ | 0.0053 | 5 | 0.4421 |
432
+ | 0.0064 | 6 | 0.4834 |
433
+ | 0.0074 | 7 | 0.4726 |
434
+ | 0.0085 | 8 | 0.4524 |
435
+ | 0.0096 | 9 | 0.4645 |
436
+ | 0.0106 | 10 | 0.4654 |
437
+ | 0.0117 | 11 | 0.4574 |
438
+ | 0.0127 | 12 | 0.5019 |
439
+ | 0.0138 | 13 | 0.4481 |
440
+ | 0.0149 | 14 | 0.423 |
441
+ | 0.0159 | 15 | 0.4694 |
442
+ | 0.0170 | 16 | 0.4316 |
443
+ | 0.0180 | 17 | 0.4372 |
444
+ | 0.0191 | 18 | 0.4623 |
445
+ | 0.0202 | 19 | 0.4222 |
446
+ | 0.0212 | 20 | 0.4494 |
447
+ | 0.0223 | 21 | 0.3932 |
448
+ | 0.0234 | 22 | 0.3924 |
449
+ | 0.0244 | 23 | 0.3869 |
450
+ | 0.0255 | 24 | 0.4064 |
451
+ | 0.0265 | 25 | 0.3945 |
452
+ | 0.0276 | 26 | 0.382 |
453
+ | 0.0287 | 27 | 0.3684 |
454
+ | 0.0297 | 28 | 0.3881 |
455
+ | 0.0308 | 29 | 0.3784 |
456
+ | 0.0318 | 30 | 0.3715 |
457
+ | 0.0329 | 31 | 0.34 |
458
+ | 0.0340 | 32 | 0.3421 |
459
+ | 0.0350 | 33 | 0.3678 |
460
+ | 0.0361 | 34 | 0.3489 |
461
+ | 0.0372 | 35 | 0.3112 |
462
+ | 0.0382 | 36 | 0.3137 |
463
+ | 0.0393 | 37 | 0.2928 |
464
+ | 0.0403 | 38 | 0.3053 |
465
+ | 0.0414 | 39 | 0.2838 |
466
+ | 0.0425 | 40 | 0.2638 |
467
+ | 0.0435 | 41 | 0.2827 |
468
+ | 0.0446 | 42 | 0.2372 |
469
+ | 0.0456 | 43 | 0.2635 |
470
+ | 0.0467 | 44 | 0.2749 |
471
+ | 0.0478 | 45 | 0.2381 |
472
+ | 0.0488 | 46 | 0.2113 |
473
+ | 0.0499 | 47 | 0.1914 |
474
+ | 0.0510 | 48 | 0.1944 |
475
+ | 0.0520 | 49 | 0.1863 |
476
+ | 0.0531 | 50 | 0.191 |
477
+ | 0.0541 | 51 | 0.1547 |
478
+ | 0.0552 | 52 | 0.1854 |
479
+ | 0.0563 | 53 | 0.1587 |
480
+ | 0.0573 | 54 | 0.1555 |
481
+ | 0.0584 | 55 | 0.1563 |
482
+ | 0.0594 | 56 | 0.1711 |
483
+ | 0.0605 | 57 | 0.1432 |
484
+ | 0.0616 | 58 | 0.1263 |
485
+ | 0.0626 | 59 | 0.1247 |
486
+ | 0.0637 | 60 | 0.1369 |
487
+ | 0.0648 | 61 | 0.1305 |
488
+ | 0.0658 | 62 | 0.1022 |
489
+ | 0.0669 | 63 | 0.1191 |
490
+ | 0.0679 | 64 | 0.1083 |
491
+ | 0.0690 | 65 | 0.0936 |
492
+ | 0.0701 | 66 | 0.0988 |
493
+ | 0.0711 | 67 | 0.0942 |
494
+ | 0.0722 | 68 | 0.107 |
495
+ | 0.0732 | 69 | 0.0823 |
496
+ | 0.0743 | 70 | 0.0886 |
497
+ | 0.0754 | 71 | 0.1055 |
498
+ | 0.0764 | 72 | 0.1013 |
499
+ | 0.0775 | 73 | 0.0807 |
500
+ | 0.0786 | 74 | 0.0776 |
501
+ | 0.0796 | 75 | 0.0737 |
502
+ | 0.0807 | 76 | 0.0916 |
503
+ | 0.0817 | 77 | 0.0654 |
504
+ | 0.0828 | 78 | 0.0904 |
505
+ | 0.0839 | 79 | 0.0954 |
506
+ | 0.0849 | 80 | 0.0697 |
507
+ | 0.0860 | 81 | 0.0751 |
508
+ | 0.0870 | 82 | 0.0886 |
509
+ | 0.0881 | 83 | 0.0752 |
510
+ | 0.0892 | 84 | 0.0806 |
511
+ | 0.0902 | 85 | 0.0807 |
512
+ | 0.0913 | 86 | 0.0842 |
513
+ | 0.0924 | 87 | 0.0821 |
514
+ | 0.0934 | 88 | 0.0723 |
515
+ | 0.0945 | 89 | 0.0797 |
516
+ | 0.0955 | 90 | 0.0797 |
517
+ | 0.0966 | 91 | 0.0832 |
518
+ | 0.0977 | 92 | 0.0713 |
519
+ | 0.0987 | 93 | 0.0681 |
520
+ | 0.0998 | 94 | 0.0825 |
521
+ | 0.1008 | 95 | 0.0838 |
522
+ | 0.1019 | 96 | 0.0746 |
523
+ | 0.1030 | 97 | 0.0792 |
524
+ | 0.1040 | 98 | 0.0692 |
525
+ | 0.1051 | 99 | 0.0705 |
526
+ | 0.1062 | 100 | 0.0666 |
527
+ | 0.1072 | 101 | 0.0692 |
528
+ | 0.1083 | 102 | 0.0675 |
529
+ | 0.1093 | 103 | 0.0734 |
530
+ | 0.1104 | 104 | 0.072 |
531
+ | 0.1115 | 105 | 0.0565 |
532
+ | 0.1125 | 106 | 0.0663 |
533
+ | 0.1136 | 107 | 0.0789 |
534
+ | 0.1146 | 108 | 0.0605 |
535
+ | 0.1157 | 109 | 0.0671 |
536
+ | 0.1168 | 110 | 0.083 |
537
+ | 0.1178 | 111 | 0.071 |
538
+ | 0.1189 | 112 | 0.0759 |
539
+ | 0.1200 | 113 | 0.0604 |
540
+ | 0.1210 | 114 | 0.0682 |
541
+ | 0.1221 | 115 | 0.0531 |
542
+ | 0.1231 | 116 | 0.0779 |
543
+ | 0.1242 | 117 | 0.0646 |
544
+ | 0.1253 | 118 | 0.0621 |
545
+ | 0.1263 | 119 | 0.081 |
546
+ | 0.1274 | 120 | 0.0688 |
547
+ | 0.1285 | 121 | 0.055 |
548
+ | 0.1295 | 122 | 0.0513 |
549
+ | 0.1306 | 123 | 0.063 |
550
+ | 0.1316 | 124 | 0.0634 |
551
+ | 0.1327 | 125 | 0.075 |
552
+ | 0.1338 | 126 | 0.062 |
553
+ | 0.1348 | 127 | 0.0821 |
554
+ | 0.1359 | 128 | 0.0565 |
555
+ | 0.1369 | 129 | 0.0492 |
556
+ | 0.1380 | 130 | 0.0762 |
557
+ | 0.1391 | 131 | 0.0735 |
558
+ | 0.1401 | 132 | 0.069 |
559
+ | 0.1412 | 133 | 0.0619 |
560
+ | 0.1423 | 134 | 0.0789 |
561
+ | 0.1433 | 135 | 0.0621 |
562
+ | 0.1444 | 136 | 0.0568 |
563
+ | 0.1454 | 137 | 0.0717 |
564
+ | 0.1465 | 138 | 0.0764 |
565
+ | 0.1476 | 139 | 0.0502 |
566
+ | 0.1486 | 140 | 0.0626 |
567
+ | 0.1497 | 141 | 0.0615 |
568
+ | 0.1507 | 142 | 0.0555 |
569
+ | 0.1518 | 143 | 0.0674 |
570
+ | 0.1529 | 144 | 0.0635 |
571
+ | 0.1539 | 145 | 0.0553 |
572
+ | 0.1550 | 146 | 0.0525 |
573
+ | 0.1561 | 147 | 0.055 |
574
+ | 0.1571 | 148 | 0.0665 |
575
+ | 0.1582 | 149 | 0.0703 |
576
+ | 0.1592 | 150 | 0.0657 |
577
+ | 0.1603 | 151 | 0.0612 |
578
+ | 0.1614 | 152 | 0.0671 |
579
+ | 0.1624 | 153 | 0.059 |
580
+ | 0.1635 | 154 | 0.0636 |
581
+ | 0.1645 | 155 | 0.0753 |
582
+ | 0.1656 | 156 | 0.0931 |
583
+ | 0.1667 | 157 | 0.0531 |
584
+ | 0.1677 | 158 | 0.0558 |
585
+ | 0.1688 | 159 | 0.0599 |
586
+ | 0.1699 | 160 | 0.0501 |
587
+ | 0.1709 | 161 | 0.051 |
588
+ | 0.1720 | 162 | 0.0697 |
589
+ | 0.1730 | 163 | 0.074 |
590
+ | 0.1741 | 164 | 0.0607 |
591
+ | 0.1752 | 165 | 0.0611 |
592
+ | 0.1762 | 166 | 0.059 |
593
+ | 0.1773 | 167 | 0.073 |
594
+ | 0.1783 | 168 | 0.0541 |
595
+ | 0.1794 | 169 | 0.0576 |
596
+ | 0.1805 | 170 | 0.0656 |
597
+ | 0.1815 | 171 | 0.0499 |
598
+ | 0.1826 | 172 | 0.055 |
599
+ | 0.1837 | 173 | 0.0646 |
600
+ | 0.1847 | 174 | 0.0747 |
601
+ | 0.1858 | 175 | 0.0558 |
602
+ | 0.1868 | 176 | 0.0537 |
603
+ | 0.1879 | 177 | 0.0574 |
604
+ | 0.1890 | 178 | 0.061 |
605
+ | 0.1900 | 179 | 0.0743 |
606
+ | 0.1911 | 180 | 0.0553 |
607
+ | 0.1921 | 181 | 0.0603 |
608
+ | 0.1932 | 182 | 0.0613 |
609
+ | 0.1943 | 183 | 0.0557 |
610
+ | 0.1953 | 184 | 0.0629 |
611
+ | 0.1964 | 185 | 0.0524 |
612
+ | 0.1975 | 186 | 0.0533 |
613
+ | 0.1985 | 187 | 0.0624 |
614
+ | 0.1996 | 188 | 0.0566 |
615
+ | 0.2006 | 189 | 0.0446 |
616
+ | 0.2017 | 190 | 0.0578 |
617
+ | 0.2028 | 191 | 0.0487 |
618
+ | 0.2038 | 192 | 0.066 |
619
+ | 0.2049 | 193 | 0.0618 |
620
+ | 0.2059 | 194 | 0.0591 |
621
+ | 0.2070 | 195 | 0.0553 |
622
+ | 0.2081 | 196 | 0.052 |
623
+ | 0.2091 | 197 | 0.0451 |
624
+ | 0.2102 | 198 | 0.0633 |
625
+ | 0.2113 | 199 | 0.0658 |
626
+ | 0.2123 | 200 | 0.0623 |
627
+ | 0.2134 | 201 | 0.0593 |
628
+ | 0.2144 | 202 | 0.0491 |
629
+ | 0.2155 | 203 | 0.0526 |
630
+ | 0.2166 | 204 | 0.057 |
631
+ | 0.2176 | 205 | 0.0631 |
632
+ | 0.2187 | 206 | 0.0809 |
633
+ | 0.2197 | 207 | 0.063 |
634
+ | 0.2208 | 208 | 0.0571 |
635
+ | 0.2219 | 209 | 0.054 |
636
+ | 0.2229 | 210 | 0.0607 |
637
+ | 0.2240 | 211 | 0.056 |
638
+ | 0.2251 | 212 | 0.06 |
639
+ | 0.2261 | 213 | 0.0597 |
640
+ | 0.2272 | 214 | 0.0538 |
641
+ | 0.2282 | 215 | 0.0584 |
642
+ | 0.2293 | 216 | 0.0473 |
643
+ | 0.2304 | 217 | 0.052 |
644
+ | 0.2314 | 218 | 0.06 |
645
+ | 0.2325 | 219 | 0.0566 |
646
+ | 0.2335 | 220 | 0.0559 |
647
+ | 0.2346 | 221 | 0.0536 |
648
+ | 0.2357 | 222 | 0.0634 |
649
+ | 0.2367 | 223 | 0.0637 |
650
+ | 0.2378 | 224 | 0.056 |
651
+ | 0.2389 | 225 | 0.0504 |
652
+ | 0.2399 | 226 | 0.0371 |
653
+ | 0.2410 | 227 | 0.0678 |
654
+ | 0.2420 | 228 | 0.0569 |
655
+ | 0.2431 | 229 | 0.0551 |
656
+ | 0.2442 | 230 | 0.0486 |
657
+ | 0.2452 | 231 | 0.0536 |
658
+ | 0.2463 | 232 | 0.0615 |
659
+ | 0.2473 | 233 | 0.0535 |
660
+ | 0.2484 | 234 | 0.0502 |
661
+ | 0.2495 | 235 | 0.0571 |
662
+ | 0.2505 | 236 | 0.0593 |
663
+ | 0.2516 | 237 | 0.0557 |
664
+ | 0.2527 | 238 | 0.0671 |
665
+ | 0.2537 | 239 | 0.0609 |
666
+ | 0.2548 | 240 | 0.0667 |
667
+ | 0.2558 | 241 | 0.064 |
668
+ | 0.2569 | 242 | 0.0503 |
669
+ | 0.2580 | 243 | 0.0461 |
670
+ | 0.2590 | 244 | 0.059 |
671
+ | 0.2601 | 245 | 0.0594 |
672
+ | 0.2611 | 246 | 0.0577 |
673
+ | 0.2622 | 247 | 0.0664 |
674
+ | 0.2633 | 248 | 0.0736 |
675
+ | 0.2643 | 249 | 0.0506 |
676
+ | 0.2654 | 250 | 0.0611 |
677
+ | 0.2665 | 251 | 0.0657 |
678
+ | 0.2675 | 252 | 0.0543 |
679
+ | 0.2686 | 253 | 0.0595 |
680
+ | 0.2696 | 254 | 0.0531 |
681
+ | 0.2707 | 255 | 0.0552 |
682
+ | 0.2718 | 256 | 0.061 |
683
+ | 0.2728 | 257 | 0.0456 |
684
+ | 0.2739 | 258 | 0.0498 |
685
+ | 0.2749 | 259 | 0.0567 |
686
+ | 0.2760 | 260 | 0.0444 |
687
+ | 0.2771 | 261 | 0.0567 |
688
+ | 0.2781 | 262 | 0.0524 |
689
+ | 0.2792 | 263 | 0.0518 |
690
+ | 0.2803 | 264 | 0.0664 |
691
+ | 0.2813 | 265 | 0.0537 |
692
+ | 0.2824 | 266 | 0.0537 |
693
+ | 0.2834 | 267 | 0.0558 |
694
+ | 0.2845 | 268 | 0.0501 |
695
+ | 0.2856 | 269 | 0.0558 |
696
+ | 0.2866 | 270 | 0.0411 |
697
+ | 0.2877 | 271 | 0.0432 |
698
+ | 0.2887 | 272 | 0.0535 |
699
+ | 0.2898 | 273 | 0.0511 |
700
+ | 0.2909 | 274 | 0.0469 |
701
+ | 0.2919 | 275 | 0.0587 |
702
+ | 0.2930 | 276 | 0.052 |
703
+ | 0.2941 | 277 | 0.0594 |
704
+ | 0.2951 | 278 | 0.0651 |
705
+ | 0.2962 | 279 | 0.0486 |
706
+ | 0.2972 | 280 | 0.0602 |
707
+ | 0.2983 | 281 | 0.0567 |
708
+ | 0.2994 | 282 | 0.0547 |
709
+ | 0.3004 | 283 | 0.0669 |
710
+ | 0.3015 | 284 | 0.0543 |
711
+ | 0.3025 | 285 | 0.0616 |
712
+ | 0.3036 | 286 | 0.0532 |
713
+ | 0.3047 | 287 | 0.0689 |
714
+ | 0.3057 | 288 | 0.0461 |
715
+ | 0.3068 | 289 | 0.0516 |
716
+ | 0.3079 | 290 | 0.0496 |
717
+ | 0.3089 | 291 | 0.0581 |
718
+ | 0.3100 | 292 | 0.0446 |
719
+ | 0.3110 | 293 | 0.048 |
720
+ | 0.3121 | 294 | 0.0442 |
721
+ | 0.3132 | 295 | 0.0504 |
722
+ | 0.3142 | 296 | 0.0531 |
723
+ | 0.3153 | 297 | 0.0681 |
724
+ | 0.3163 | 298 | 0.0458 |
725
+ | 0.3174 | 299 | 0.0584 |
726
+ | 0.3185 | 300 | 0.064 |
727
+ | 0.3195 | 301 | 0.0595 |
728
+ | 0.3206 | 302 | 0.0604 |
729
+ | 0.3217 | 303 | 0.0621 |
730
+ | 0.3227 | 304 | 0.0466 |
731
+ | 0.3238 | 305 | 0.0545 |
732
+ | 0.3248 | 306 | 0.0523 |
733
+ | 0.3259 | 307 | 0.0496 |
734
+ | 0.3270 | 308 | 0.0468 |
735
+ | 0.3280 | 309 | 0.0649 |
736
+ | 0.3291 | 310 | 0.056 |
737
+ | 0.3301 | 311 | 0.0539 |
738
+ | 0.3312 | 312 | 0.0497 |
739
+ | 0.3323 | 313 | 0.0517 |
740
+ | 0.3333 | 314 | 0.0511 |
741
+ | 0.3344 | 315 | 0.0511 |
742
+ | 0.3355 | 316 | 0.0518 |
743
+ | 0.3365 | 317 | 0.0508 |
744
+ | 0.3376 | 318 | 0.0579 |
745
+ | 0.3386 | 319 | 0.0463 |
746
+ | 0.3397 | 320 | 0.046 |
747
+ | 0.3408 | 321 | 0.0461 |
748
+ | 0.3418 | 322 | 0.0469 |
749
+ | 0.3429 | 323 | 0.0399 |
750
+ | 0.3439 | 324 | 0.0516 |
751
+ | 0.3450 | 325 | 0.0551 |
752
+ | 0.3461 | 326 | 0.0497 |
753
+ | 0.3471 | 327 | 0.0455 |
754
+ | 0.3482 | 328 | 0.0534 |
755
+ | 0.3493 | 329 | 0.0437 |
756
+ | 0.3503 | 330 | 0.0542 |
757
+ | 0.3514 | 331 | 0.0462 |
758
+ | 0.3524 | 332 | 0.0429 |
759
+ | 0.3535 | 333 | 0.0542 |
760
+ | 0.3546 | 334 | 0.0452 |
761
+ | 0.3556 | 335 | 0.0569 |
762
+ | 0.3567 | 336 | 0.0495 |
763
+ | 0.3577 | 337 | 0.0443 |
764
+ | 0.3588 | 338 | 0.0543 |
765
+ | 0.3599 | 339 | 0.0671 |
766
+ | 0.3609 | 340 | 0.054 |
767
+ | 0.3620 | 341 | 0.0596 |
768
+ | 0.3631 | 342 | 0.0468 |
769
+ | 0.3641 | 343 | 0.0644 |
770
+ | 0.3652 | 344 | 0.044 |
771
+ | 0.3662 | 345 | 0.0477 |
772
+ | 0.3673 | 346 | 0.0403 |
773
+ | 0.3684 | 347 | 0.0553 |
774
+ | 0.3694 | 348 | 0.0533 |
775
+ | 0.3705 | 349 | 0.0447 |
776
+ | 0.3715 | 350 | 0.0527 |
777
+ | 0.3726 | 351 | 0.0465 |
778
+ | 0.3737 | 352 | 0.0518 |
779
+ | 0.3747 | 353 | 0.0345 |
780
+ | 0.3758 | 354 | 0.0515 |
781
+ | 0.3769 | 355 | 0.0438 |
782
+ | 0.3779 | 356 | 0.0489 |
783
+ | 0.3790 | 357 | 0.046 |
784
+ | 0.3800 | 358 | 0.0621 |
785
+ | 0.3811 | 359 | 0.0667 |
786
+ | 0.3822 | 360 | 0.0489 |
787
+ | 0.3832 | 361 | 0.0555 |
788
+ | 0.3843 | 362 | 0.0445 |
789
+ | 0.3854 | 363 | 0.0492 |
790
+ | 0.3864 | 364 | 0.0562 |
791
+ | 0.3875 | 365 | 0.0484 |
792
+ | 0.3885 | 366 | 0.0582 |
793
+ | 0.3896 | 367 | 0.0551 |
794
+ | 0.3907 | 368 | 0.0512 |
795
+ | 0.3917 | 369 | 0.0486 |
796
+ | 0.3928 | 370 | 0.0537 |
797
+ | 0.3938 | 371 | 0.0499 |
798
+ | 0.3949 | 372 | 0.0651 |
799
+ | 0.3960 | 373 | 0.0531 |
800
+ | 0.3970 | 374 | 0.0743 |
801
+ | 0.3981 | 375 | 0.052 |
802
+ | 0.3992 | 376 | 0.0476 |
803
+ | 0.4002 | 377 | 0.0572 |
804
+ | 0.4013 | 378 | 0.0555 |
805
+ | 0.4023 | 379 | 0.0569 |
806
+ | 0.4034 | 380 | 0.052 |
807
+ | 0.4045 | 381 | 0.0524 |
808
+ | 0.4055 | 382 | 0.0726 |
809
+ | 0.4066 | 383 | 0.0456 |
810
+ | 0.4076 | 384 | 0.0531 |
811
+ | 0.4087 | 385 | 0.0474 |
812
+ | 0.4098 | 386 | 0.0485 |
813
+ | 0.4108 | 387 | 0.0459 |
814
+ | 0.4119 | 388 | 0.0474 |
815
+ | 0.4130 | 389 | 0.0541 |
816
+ | 0.4140 | 390 | 0.0452 |
817
+ | 0.4151 | 391 | 0.0362 |
818
+ | 0.4161 | 392 | 0.0407 |
819
+ | 0.4172 | 393 | 0.0449 |
820
+ | 0.4183 | 394 | 0.0444 |
821
+ | 0.4193 | 395 | 0.0469 |
822
+ | 0.4204 | 396 | 0.0493 |
823
+ | 0.4214 | 397 | 0.0437 |
824
+ | 0.4225 | 398 | 0.0551 |
825
+ | 0.4236 | 399 | 0.0412 |
826
+ | 0.4246 | 400 | 0.0401 |
827
+ | 0.4257 | 401 | 0.0488 |
828
+ | 0.4268 | 402 | 0.0506 |
829
+ | 0.4278 | 403 | 0.0458 |
830
+ | 0.4289 | 404 | 0.0436 |
831
+ | 0.4299 | 405 | 0.0574 |
832
+ | 0.4310 | 406 | 0.0516 |
833
+ | 0.4321 | 407 | 0.0599 |
834
+ | 0.4331 | 408 | 0.0476 |
835
+ | 0.4342 | 409 | 0.0462 |
836
+ | 0.4352 | 410 | 0.0502 |
837
+ | 0.4363 | 411 | 0.0448 |
838
+ | 0.4374 | 412 | 0.0461 |
839
+ | 0.4384 | 413 | 0.035 |
840
+ | 0.4395 | 414 | 0.0451 |
841
+ | 0.4406 | 415 | 0.0456 |
842
+ | 0.4416 | 416 | 0.0399 |
843
+ | 0.4427 | 417 | 0.0602 |
844
+ | 0.4437 | 418 | 0.0588 |
845
+ | 0.4448 | 419 | 0.0675 |
846
+ | 0.4459 | 420 | 0.0628 |
847
+ | 0.4469 | 421 | 0.0498 |
848
+ | 0.4480 | 422 | 0.0413 |
849
+ | 0.4490 | 423 | 0.0437 |
850
+ | 0.4501 | 424 | 0.0514 |
851
+ | 0.4512 | 425 | 0.0586 |
852
+ | 0.4522 | 426 | 0.0596 |
853
+ | 0.4533 | 427 | 0.0368 |
854
+ | 0.4544 | 428 | 0.0448 |
855
+ | 0.4554 | 429 | 0.056 |
856
+ | 0.4565 | 430 | 0.0415 |
857
+ | 0.4575 | 431 | 0.0448 |
858
+ | 0.4586 | 432 | 0.055 |
859
+ | 0.4597 | 433 | 0.0442 |
860
+ | 0.4607 | 434 | 0.0462 |
861
+ | 0.4618 | 435 | 0.0479 |
862
+ | 0.4628 | 436 | 0.0507 |
863
+ | 0.4639 | 437 | 0.049 |
864
+ | 0.4650 | 438 | 0.0626 |
865
+ | 0.4660 | 439 | 0.0375 |
866
+ | 0.4671 | 440 | 0.0541 |
867
+ | 0.4682 | 441 | 0.0579 |
868
+ | 0.4692 | 442 | 0.0642 |
869
+ | 0.4703 | 443 | 0.0471 |
870
+ | 0.4713 | 444 | 0.0559 |
871
+ | 0.4724 | 445 | 0.0508 |
872
+ | 0.4735 | 446 | 0.0696 |
873
+ | 0.4745 | 447 | 0.056 |
874
+ | 0.4756 | 448 | 0.0649 |
875
+ | 0.4766 | 449 | 0.0641 |
876
+ | 0.4777 | 450 | 0.0547 |
877
+ | 0.4788 | 451 | 0.0509 |
878
+ | 0.4798 | 452 | 0.0544 |
879
+ | 0.4809 | 453 | 0.0487 |
880
+ | 0.4820 | 454 | 0.0639 |
881
+ | 0.4830 | 455 | 0.047 |
882
+ | 0.4841 | 456 | 0.0513 |
883
+ | 0.4851 | 457 | 0.0451 |
884
+ | 0.4862 | 458 | 0.0567 |
885
+ | 0.4873 | 459 | 0.0541 |
886
+ | 0.4883 | 460 | 0.0475 |
887
+ | 0.4894 | 461 | 0.0445 |
888
+ | 0.4904 | 462 | 0.0597 |
889
+ | 0.4915 | 463 | 0.0434 |
890
+ | 0.4926 | 464 | 0.0468 |
891
+ | 0.4936 | 465 | 0.0449 |
892
+ | 0.4947 | 466 | 0.0422 |
893
+ | 0.4958 | 467 | 0.0504 |
894
+ | 0.4968 | 468 | 0.0565 |
895
+ | 0.4979 | 469 | 0.0611 |
896
+ | 0.4989 | 470 | 0.044 |
897
+ | 0.5 | 471 | 0.0543 |
898
+ | 0.5011 | 472 | 0.0424 |
899
+ | 0.5021 | 473 | 0.0443 |
900
+ | 0.5032 | 474 | 0.0367 |
901
+ | 0.5042 | 475 | 0.0427 |
902
+ | 0.5053 | 476 | 0.0431 |
903
+ | 0.5064 | 477 | 0.063 |
904
+ | 0.5074 | 478 | 0.0421 |
905
+ | 0.5085 | 479 | 0.0367 |
906
+ | 0.5096 | 480 | 0.0456 |
907
+ | 0.5106 | 481 | 0.0586 |
908
+ | 0.5117 | 482 | 0.0747 |
909
+ | 0.5127 | 483 | 0.05 |
910
+ | 0.5138 | 484 | 0.0509 |
911
+ | 0.5149 | 485 | 0.054 |
912
+ | 0.5159 | 486 | 0.0531 |
913
+ | 0.5170 | 487 | 0.0458 |
914
+ | 0.5180 | 488 | 0.0522 |
915
+ | 0.5191 | 489 | 0.0406 |
916
+ | 0.5202 | 490 | 0.0529 |
917
+ | 0.5212 | 491 | 0.0602 |
918
+ | 0.5223 | 492 | 0.0469 |
919
+ | 0.5234 | 493 | 0.0602 |
920
+ | 0.5244 | 494 | 0.0506 |
921
+ | 0.5255 | 495 | 0.0522 |
922
+ | 0.5265 | 496 | 0.0433 |
923
+ | 0.5276 | 497 | 0.0531 |
924
+ | 0.5287 | 498 | 0.0453 |
925
+ | 0.5297 | 499 | 0.0416 |
926
+ | 0.5308 | 500 | 0.0366 |
927
+ | 0.5318 | 501 | 0.0483 |
928
+ | 0.5329 | 502 | 0.0453 |
929
+ | 0.5340 | 503 | 0.0495 |
930
+ | 0.5350 | 504 | 0.0522 |
931
+ | 0.5361 | 505 | 0.0476 |
932
+ | 0.5372 | 506 | 0.0416 |
933
+ | 0.5382 | 507 | 0.0497 |
934
+ | 0.5393 | 508 | 0.0431 |
935
+ | 0.5403 | 509 | 0.0494 |
936
+ | 0.5414 | 510 | 0.041 |
937
+ | 0.5425 | 511 | 0.0412 |
938
+ | 0.5435 | 512 | 0.0399 |
939
+ | 0.5446 | 513 | 0.0478 |
940
+ | 0.5456 | 514 | 0.061 |
941
+ | 0.5467 | 515 | 0.0353 |
942
+ | 0.5478 | 516 | 0.0469 |
943
+ | 0.5488 | 517 | 0.0517 |
944
+ | 0.5499 | 518 | 0.0523 |
945
+ | 0.5510 | 519 | 0.058 |
946
+ | 0.5520 | 520 | 0.0432 |
947
+ | 0.5531 | 521 | 0.0442 |
948
+ | 0.5541 | 522 | 0.0551 |
949
+ | 0.5552 | 523 | 0.0488 |
950
+ | 0.5563 | 524 | 0.0482 |
951
+ | 0.5573 | 525 | 0.0474 |
952
+ | 0.5584 | 526 | 0.0577 |
953
+ | 0.5594 | 527 | 0.0375 |
954
+ | 0.5605 | 528 | 0.0401 |
955
+ | 0.5616 | 529 | 0.0574 |
956
+ | 0.5626 | 530 | 0.0496 |
957
+ | 0.5637 | 531 | 0.0422 |
958
+ | 0.5648 | 532 | 0.047 |
959
+ | 0.5658 | 533 | 0.0455 |
960
+ | 0.5669 | 534 | 0.0405 |
961
+ | 0.5679 | 535 | 0.0391 |
962
+ | 0.5690 | 536 | 0.0495 |
963
+ | 0.5701 | 537 | 0.0464 |
964
+ | 0.5711 | 538 | 0.0457 |
965
+ | 0.5722 | 539 | 0.0449 |
966
+ | 0.5732 | 540 | 0.0583 |
967
+ | 0.5743 | 541 | 0.0591 |
968
+ | 0.5754 | 542 | 0.0487 |
969
+ | 0.5764 | 543 | 0.0456 |
970
+ | 0.5775 | 544 | 0.0423 |
971
+ | 0.5786 | 545 | 0.0571 |
972
+ | 0.5796 | 546 | 0.0472 |
973
+ | 0.5807 | 547 | 0.0556 |
974
+ | 0.5817 | 548 | 0.0483 |
975
+ | 0.5828 | 549 | 0.0424 |
976
+ | 0.5839 | 550 | 0.0557 |
977
+ | 0.5849 | 551 | 0.038 |
978
+ | 0.5860 | 552 | 0.0394 |
979
+ | 0.5870 | 553 | 0.0481 |
980
+ | 0.5881 | 554 | 0.0617 |
981
+ | 0.5892 | 555 | 0.0455 |
982
+ | 0.5902 | 556 | 0.0411 |
983
+ | 0.5913 | 557 | 0.0433 |
984
+ | 0.5924 | 558 | 0.0456 |
985
+ | 0.5934 | 559 | 0.0488 |
986
+ | 0.5945 | 560 | 0.0517 |
987
+ | 0.5955 | 561 | 0.0549 |
988
+ | 0.5966 | 562 | 0.0406 |
989
+ | 0.5977 | 563 | 0.045 |
990
+ | 0.5987 | 564 | 0.049 |
991
+ | 0.5998 | 565 | 0.0547 |
992
+ | 0.6008 | 566 | 0.0529 |
993
+ | 0.6019 | 567 | 0.0524 |
994
+ | 0.6030 | 568 | 0.0472 |
995
+ | 0.6040 | 569 | 0.039 |
996
+ | 0.6051 | 570 | 0.041 |
997
+ | 0.6062 | 571 | 0.0508 |
998
+ | 0.6072 | 572 | 0.0486 |
999
+ | 0.6083 | 573 | 0.0375 |
1000
+ | 0.6093 | 574 | 0.0585 |
1001
+ | 0.6104 | 575 | 0.05 |
1002
+ | 0.6115 | 576 | 0.0509 |
1003
+ | 0.6125 | 577 | 0.0394 |
1004
+ | 0.6136 | 578 | 0.0467 |
1005
+ | 0.6146 | 579 | 0.0371 |
1006
+ | 0.6157 | 580 | 0.0415 |
1007
+ | 0.6168 | 581 | 0.046 |
1008
+ | 0.6178 | 582 | 0.0385 |
1009
+ | 0.6189 | 583 | 0.056 |
1010
+ | 0.6200 | 584 | 0.0416 |
1011
+ | 0.6210 | 585 | 0.0578 |
1012
+ | 0.6221 | 586 | 0.0443 |
1013
+ | 0.6231 | 587 | 0.0407 |
1014
+ | 0.6242 | 588 | 0.0499 |
1015
+ | 0.6253 | 589 | 0.056 |
1016
+ | 0.6263 | 590 | 0.0456 |
1017
+ | 0.6274 | 591 | 0.0412 |
1018
+ | 0.6285 | 592 | 0.0473 |
1019
+ | 0.6295 | 593 | 0.0378 |
1020
+ | 0.6306 | 594 | 0.0544 |
1021
+ | 0.6316 | 595 | 0.0502 |
1022
+ | 0.6327 | 596 | 0.042 |
1023
+ | 0.6338 | 597 | 0.0414 |
1024
+ | 0.6348 | 598 | 0.0506 |
1025
+ | 0.6359 | 599 | 0.0372 |
1026
+ | 0.6369 | 600 | 0.0411 |
1027
+ | 0.6380 | 601 | 0.0387 |
1028
+ | 0.6391 | 602 | 0.0588 |
1029
+ | 0.6401 | 603 | 0.0404 |
1030
+ | 0.6412 | 604 | 0.056 |
1031
+ | 0.6423 | 605 | 0.0524 |
1032
+ | 0.6433 | 606 | 0.0484 |
1033
+ | 0.6444 | 607 | 0.0398 |
1034
+ | 0.6454 | 608 | 0.0523 |
1035
+ | 0.6465 | 609 | 0.0469 |
1036
+ | 0.6476 | 610 | 0.0504 |
1037
+ | 0.6486 | 611 | 0.0496 |
1038
+ | 0.6497 | 612 | 0.0501 |
1039
+ | 0.6507 | 613 | 0.0426 |
1040
+ | 0.6518 | 614 | 0.0454 |
1041
+ | 0.6529 | 615 | 0.0564 |
1042
+ | 0.6539 | 616 | 0.0798 |
1043
+ | 0.6550 | 617 | 0.0444 |
1044
+ | 0.6561 | 618 | 0.039 |
1045
+ | 0.6571 | 619 | 0.0428 |
1046
+ | 0.6582 | 620 | 0.0504 |
1047
+ | 0.6592 | 621 | 0.0525 |
1048
+ | 0.6603 | 622 | 0.0471 |
1049
+ | 0.6614 | 623 | 0.0402 |
1050
+ | 0.6624 | 624 | 0.0456 |
1051
+ | 0.6635 | 625 | 0.0384 |
1052
+ | 0.6645 | 626 | 0.0446 |
1053
+ | 0.6656 | 627 | 0.0468 |
1054
+ | 0.6667 | 628 | 0.047 |
1055
+ | 0.6677 | 629 | 0.0442 |
1056
+ | 0.6688 | 630 | 0.0466 |
1057
+ | 0.6699 | 631 | 0.0457 |
1058
+ | 0.6709 | 632 | 0.0538 |
1059
+ | 0.6720 | 633 | 0.0434 |
1060
+ | 0.6730 | 634 | 0.0443 |
1061
+ | 0.6741 | 635 | 0.0481 |
1062
+ | 0.6752 | 636 | 0.0483 |
1063
+ | 0.6762 | 637 | 0.0434 |
1064
+ | 0.6773 | 638 | 0.0389 |
1065
+ | 0.6783 | 639 | 0.0541 |
1066
+ | 0.6794 | 640 | 0.0453 |
1067
+ | 0.6805 | 641 | 0.0508 |
1068
+ | 0.6815 | 642 | 0.0469 |
1069
+ | 0.6826 | 643 | 0.0431 |
1070
+ | 0.6837 | 644 | 0.0446 |
1071
+ | 0.6847 | 645 | 0.0427 |
1072
+ | 0.6858 | 646 | 0.0543 |
1073
+ | 0.6868 | 647 | 0.0458 |
1074
+ | 0.6879 | 648 | 0.046 |
1075
+ | 0.6890 | 649 | 0.0669 |
1076
+ | 0.6900 | 650 | 0.046 |
1077
+ | 0.6911 | 651 | 0.0462 |
1078
+ | 0.6921 | 652 | 0.0493 |
1079
+ | 0.6932 | 653 | 0.0484 |
1080
+ | 0.6943 | 654 | 0.0466 |
1081
+ | 0.6953 | 655 | 0.048 |
1082
+ | 0.6964 | 656 | 0.0406 |
1083
+ | 0.6975 | 657 | 0.0512 |
1084
+ | 0.6985 | 658 | 0.0469 |
1085
+ | 0.6996 | 659 | 0.0461 |
1086
+ | 0.7006 | 660 | 0.039 |
1087
+ | 0.7017 | 661 | 0.0403 |
1088
+ | 0.7028 | 662 | 0.0419 |
1089
+ | 0.7038 | 663 | 0.0538 |
1090
+ | 0.7049 | 664 | 0.0364 |
1091
+ | 0.7059 | 665 | 0.039 |
1092
+ | 0.7070 | 666 | 0.0417 |
1093
+ | 0.7081 | 667 | 0.0478 |
1094
+ | 0.7091 | 668 | 0.0443 |
1095
+ | 0.7102 | 669 | 0.0394 |
1096
+ | 0.7113 | 670 | 0.0417 |
1097
+ | 0.7123 | 671 | 0.0412 |
1098
+ | 0.7134 | 672 | 0.0493 |
1099
+ | 0.7144 | 673 | 0.0532 |
1100
+ | 0.7155 | 674 | 0.0371 |
1101
+ | 0.7166 | 675 | 0.0344 |
1102
+ | 0.7176 | 676 | 0.0421 |
1103
+ | 0.7187 | 677 | 0.0489 |
1104
+ | 0.7197 | 678 | 0.0362 |
1105
+ | 0.7208 | 679 | 0.0539 |
1106
+ | 0.7219 | 680 | 0.0404 |
1107
+ | 0.7229 | 681 | 0.0607 |
1108
+ | 0.7240 | 682 | 0.0456 |
1109
+ | 0.7251 | 683 | 0.0507 |
1110
+ | 0.7261 | 684 | 0.0415 |
1111
+ | 0.7272 | 685 | 0.0361 |
1112
+ | 0.7282 | 686 | 0.053 |
1113
+ | 0.7293 | 687 | 0.0431 |
1114
+ | 0.7304 | 688 | 0.0463 |
1115
+ | 0.7314 | 689 | 0.0401 |
1116
+ | 0.7325 | 690 | 0.0549 |
1117
+ | 0.7335 | 691 | 0.0335 |
1118
+ | 0.7346 | 692 | 0.05 |
1119
+ | 0.7357 | 693 | 0.0472 |
1120
+ | 0.7367 | 694 | 0.0474 |
1121
+ | 0.7378 | 695 | 0.0556 |
1122
+ | 0.7389 | 696 | 0.0456 |
1123
+ | 0.7399 | 697 | 0.0481 |
1124
+ | 0.7410 | 698 | 0.0388 |
1125
+ | 0.7420 | 699 | 0.0381 |
1126
+ | 0.7431 | 700 | 0.0491 |
1127
+ | 0.7442 | 701 | 0.0436 |
1128
+ | 0.7452 | 702 | 0.0522 |
1129
+ | 0.7463 | 703 | 0.0471 |
1130
+ | 0.7473 | 704 | 0.0367 |
1131
+ | 0.7484 | 705 | 0.0393 |
1132
+ | 0.7495 | 706 | 0.0418 |
1133
+ | 0.7505 | 707 | 0.0371 |
1134
+ | 0.7516 | 708 | 0.0315 |
1135
+ | 0.7527 | 709 | 0.0508 |
1136
+ | 0.7537 | 710 | 0.0535 |
1137
+ | 0.7548 | 711 | 0.0453 |
1138
+ | 0.7558 | 712 | 0.0352 |
1139
+ | 0.7569 | 713 | 0.0507 |
1140
+ | 0.7580 | 714 | 0.046 |
1141
+ | 0.7590 | 715 | 0.0393 |
1142
+ | 0.7601 | 716 | 0.0453 |
1143
+ | 0.7611 | 717 | 0.0403 |
1144
+ | 0.7622 | 718 | 0.0346 |
1145
+ | 0.7633 | 719 | 0.0492 |
1146
+ | 0.7643 | 720 | 0.0437 |
1147
+ | 0.7654 | 721 | 0.042 |
1148
+ | 0.7665 | 722 | 0.052 |
1149
+ | 0.7675 | 723 | 0.043 |
1150
+ | 0.7686 | 724 | 0.0524 |
1151
+ | 0.7696 | 725 | 0.0385 |
1152
+ | 0.7707 | 726 | 0.0484 |
1153
+ | 0.7718 | 727 | 0.0454 |
1154
+ | 0.7728 | 728 | 0.0478 |
1155
+ | 0.7739 | 729 | 0.0411 |
1156
+ | 0.7749 | 730 | 0.0415 |
1157
+ | 0.7760 | 731 | 0.0323 |
1158
+ | 0.7771 | 732 | 0.0492 |
1159
+ | 0.7781 | 733 | 0.0429 |
1160
+ | 0.7792 | 734 | 0.0445 |
1161
+ | 0.7803 | 735 | 0.0484 |
1162
+ | 0.7813 | 736 | 0.042 |
1163
+ | 0.7824 | 737 | 0.0486 |
1164
+ | 0.7834 | 738 | 0.0349 |
1165
+ | 0.7845 | 739 | 0.0472 |
1166
+ | 0.7856 | 740 | 0.0413 |
1167
+ | 0.7866 | 741 | 0.0476 |
1168
+ | 0.7877 | 742 | 0.0519 |
1169
+ | 0.7887 | 743 | 0.0405 |
1170
+ | 0.7898 | 744 | 0.0439 |
1171
+ | 0.7909 | 745 | 0.035 |
1172
+ | 0.7919 | 746 | 0.0478 |
1173
+ | 0.7930 | 747 | 0.0476 |
1174
+ | 0.7941 | 748 | 0.0382 |
1175
+ | 0.7951 | 749 | 0.0568 |
1176
+ | 0.7962 | 750 | 0.0505 |
1177
+ | 0.7972 | 751 | 0.0572 |
1178
+ | 0.7983 | 752 | 0.0352 |
1179
+ | 0.7994 | 753 | 0.0405 |
1180
+ | 0.8004 | 754 | 0.0505 |
1181
+ | 0.8015 | 755 | 0.0478 |
1182
+ | 0.8025 | 756 | 0.0465 |
1183
+ | 0.8036 | 757 | 0.0493 |
1184
+ | 0.8047 | 758 | 0.0414 |
1185
+ | 0.8057 | 759 | 0.0438 |
1186
+ | 0.8068 | 760 | 0.0559 |
1187
+ | 0.8079 | 761 | 0.044 |
1188
+ | 0.8089 | 762 | 0.0385 |
1189
+ | 0.8100 | 763 | 0.0414 |
1190
+ | 0.8110 | 764 | 0.0516 |
1191
+ | 0.8121 | 765 | 0.0475 |
1192
+ | 0.8132 | 766 | 0.0394 |
1193
+ | 0.8142 | 767 | 0.0566 |
1194
+ | 0.8153 | 768 | 0.0385 |
1195
+ | 0.8163 | 769 | 0.0405 |
1196
+ | 0.8174 | 770 | 0.0392 |
1197
+ | 0.8185 | 771 | 0.0364 |
1198
+ | 0.8195 | 772 | 0.0501 |
1199
+ | 0.8206 | 773 | 0.0462 |
1200
+ | 0.8217 | 774 | 0.0436 |
1201
+ | 0.8227 | 775 | 0.0548 |
1202
+ | 0.8238 | 776 | 0.0429 |
1203
+ | 0.8248 | 777 | 0.0416 |
1204
+ | 0.8259 | 778 | 0.043 |
1205
+ | 0.8270 | 779 | 0.0481 |
1206
+ | 0.8280 | 780 | 0.0382 |
1207
+ | 0.8291 | 781 | 0.0439 |
1208
+ | 0.8301 | 782 | 0.0369 |
1209
+ | 0.8312 | 783 | 0.0377 |
1210
+ | 0.8323 | 784 | 0.0463 |
1211
+ | 0.8333 | 785 | 0.0372 |
1212
+ | 0.8344 | 786 | 0.0563 |
1213
+ | 0.8355 | 787 | 0.0447 |
1214
+ | 0.8365 | 788 | 0.0366 |
1215
+ | 0.8376 | 789 | 0.0466 |
1216
+ | 0.8386 | 790 | 0.049 |
1217
+ | 0.8397 | 791 | 0.0557 |
1218
+ | 0.8408 | 792 | 0.0495 |
1219
+ | 0.8418 | 793 | 0.0359 |
1220
+ | 0.8429 | 794 | 0.0519 |
1221
+ | 0.8439 | 795 | 0.0538 |
1222
+ | 0.8450 | 796 | 0.0388 |
1223
+ | 0.8461 | 797 | 0.0431 |
1224
+ | 0.8471 | 798 | 0.0513 |
1225
+ | 0.8482 | 799 | 0.047 |
1226
+ | 0.8493 | 800 | 0.0485 |
1227
+ | 0.8503 | 801 | 0.052 |
1228
+ | 0.8514 | 802 | 0.032 |
1229
+ | 0.8524 | 803 | 0.0419 |
1230
+ | 0.8535 | 804 | 0.0439 |
1231
+ | 0.8546 | 805 | 0.0548 |
1232
+ | 0.8556 | 806 | 0.0433 |
1233
+ | 0.8567 | 807 | 0.0407 |
1234
+ | 0.8577 | 808 | 0.0467 |
1235
+ | 0.8588 | 809 | 0.0494 |
1236
+ | 0.8599 | 810 | 0.0516 |
1237
+ | 0.8609 | 811 | 0.0418 |
1238
+ | 0.8620 | 812 | 0.0344 |
1239
+ | 0.8631 | 813 | 0.0505 |
1240
+ | 0.8641 | 814 | 0.0477 |
1241
+ | 0.8652 | 815 | 0.0533 |
1242
+ | 0.8662 | 816 | 0.0431 |
1243
+ | 0.8673 | 817 | 0.0439 |
1244
+ | 0.8684 | 818 | 0.0321 |
1245
+ | 0.8694 | 819 | 0.0418 |
1246
+ | 0.8705 | 820 | 0.043 |
1247
+ | 0.8715 | 821 | 0.035 |
1248
+ | 0.8726 | 822 | 0.0473 |
1249
+ | 0.8737 | 823 | 0.0294 |
1250
+ | 0.8747 | 824 | 0.0573 |
1251
+ | 0.8758 | 825 | 0.038 |
1252
+ | 0.8769 | 826 | 0.04 |
1253
+ | 0.8779 | 827 | 0.0406 |
1254
+ | 0.8790 | 828 | 0.0413 |
1255
+ | 0.8800 | 829 | 0.0416 |
1256
+ | 0.8811 | 830 | 0.0344 |
1257
+ | 0.8822 | 831 | 0.0511 |
1258
+ | 0.8832 | 832 | 0.0403 |
1259
+ | 0.8843 | 833 | 0.0613 |
1260
+ | 0.8854 | 834 | 0.0384 |
1261
+ | 0.8864 | 835 | 0.0363 |
1262
+ | 0.8875 | 836 | 0.0324 |
1263
+ | 0.8885 | 837 | 0.0472 |
1264
+ | 0.8896 | 838 | 0.049 |
1265
+ | 0.8907 | 839 | 0.0465 |
1266
+ | 0.8917 | 840 | 0.0419 |
1267
+ | 0.8928 | 841 | 0.0455 |
1268
+ | 0.8938 | 842 | 0.0481 |
1269
+ | 0.8949 | 843 | 0.0463 |
1270
+ | 0.8960 | 844 | 0.0352 |
1271
+ | 0.8970 | 845 | 0.0527 |
1272
+ | 0.8981 | 846 | 0.0561 |
1273
+ | 0.8992 | 847 | 0.0381 |
1274
+ | 0.9002 | 848 | 0.0434 |
1275
+ | 0.9013 | 849 | 0.0436 |
1276
+ | 0.9023 | 850 | 0.0462 |
1277
+ | 0.9034 | 851 | 0.0503 |
1278
+ | 0.9045 | 852 | 0.0479 |
1279
+ | 0.9055 | 853 | 0.0451 |
1280
+ | 0.9066 | 854 | 0.0459 |
1281
+ | 0.9076 | 855 | 0.0508 |
1282
+ | 0.9087 | 856 | 0.0453 |
1283
+ | 0.9098 | 857 | 0.0444 |
1284
+ | 0.9108 | 858 | 0.0461 |
1285
+ | 0.9119 | 859 | 0.056 |
1286
+ | 0.9130 | 860 | 0.0449 |
1287
+ | 0.9140 | 861 | 0.0477 |
1288
+ | 0.9151 | 862 | 0.0422 |
1289
+ | 0.9161 | 863 | 0.0481 |
1290
+ | 0.9172 | 864 | 0.0508 |
1291
+ | 0.9183 | 865 | 0.037 |
1292
+ | 0.9193 | 866 | 0.0491 |
1293
+ | 0.9204 | 867 | 0.0627 |
1294
+ | 0.9214 | 868 | 0.0432 |
1295
+ | 0.9225 | 869 | 0.0377 |
1296
+ | 0.9236 | 870 | 0.0448 |
1297
+ | 0.9246 | 871 | 0.0366 |
1298
+ | 0.9257 | 872 | 0.0406 |
1299
+ | 0.9268 | 873 | 0.0445 |
1300
+ | 0.9278 | 874 | 0.0424 |
1301
+ | 0.9289 | 875 | 0.0322 |
1302
+ | 0.9299 | 876 | 0.0441 |
1303
+ | 0.9310 | 877 | 0.0498 |
1304
+ | 0.9321 | 878 | 0.0418 |
1305
+ | 0.9331 | 879 | 0.0524 |
1306
+ | 0.9342 | 880 | 0.06 |
1307
+ | 0.9352 | 881 | 0.0428 |
1308
+ | 0.9363 | 882 | 0.0428 |
1309
+ | 0.9374 | 883 | 0.0509 |
1310
+ | 0.9384 | 884 | 0.0428 |
1311
+ | 0.9395 | 885 | 0.0295 |
1312
+ | 0.9406 | 886 | 0.0535 |
1313
+ | 0.9416 | 887 | 0.04 |
1314
+ | 0.9427 | 888 | 0.0425 |
1315
+ | 0.9437 | 889 | 0.0583 |
1316
+ | 0.9448 | 890 | 0.0374 |
1317
+ | 0.9459 | 891 | 0.0489 |
1318
+ | 0.9469 | 892 | 0.0472 |
1319
+ | 0.9480 | 893 | 0.0449 |
1320
+ | 0.9490 | 894 | 0.0342 |
1321
+ | 0.9501 | 895 | 0.0604 |
1322
+ | 0.9512 | 896 | 0.047 |
1323
+ | 0.9522 | 897 | 0.0433 |
1324
+ | 0.9533 | 898 | 0.0355 |
1325
+ | 0.9544 | 899 | 0.0419 |
1326
+ | 0.9554 | 900 | 0.044 |
1327
+ | 0.9565 | 901 | 0.0457 |
1328
+ | 0.9575 | 902 | 0.0377 |
1329
+ | 0.9586 | 903 | 0.0416 |
1330
+ | 0.9597 | 904 | 0.0505 |
1331
+ | 0.9607 | 905 | 0.0487 |
1332
+ | 0.9618 | 906 | 0.0473 |
1333
+ | 0.9628 | 907 | 0.0521 |
1334
+ | 0.9639 | 908 | 0.0336 |
1335
+ | 0.9650 | 909 | 0.0446 |
1336
+ | 0.9660 | 910 | 0.0423 |
1337
+ | 0.9671 | 911 | 0.0442 |
1338
+ | 0.9682 | 912 | 0.0505 |
1339
+ | 0.9692 | 913 | 0.0488 |
1340
+ | 0.9703 | 914 | 0.0367 |
1341
+ | 0.9713 | 915 | 0.0382 |
1342
+ | 0.9724 | 916 | 0.0487 |
1343
+ | 0.9735 | 917 | 0.061 |
1344
+ | 0.9745 | 918 | 0.0461 |
1345
+ | 0.9756 | 919 | 0.0377 |
1346
+ | 0.9766 | 920 | 0.0398 |
1347
+ | 0.9777 | 921 | 0.0363 |
1348
+ | 0.9788 | 922 | 0.0375 |
1349
+ | 0.9798 | 923 | 0.0503 |
1350
+ | 0.9809 | 924 | 0.0493 |
1351
+ | 0.9820 | 925 | 0.04 |
1352
+ | 0.9830 | 926 | 0.0379 |
1353
+ | 0.9841 | 927 | 0.0422 |
1354
+ | 0.9851 | 928 | 0.0517 |
1355
+ | 0.9862 | 929 | 0.0488 |
1356
+ | 0.9873 | 930 | 0.057 |
1357
+ | 0.9883 | 931 | 0.0388 |
1358
+ | 0.9894 | 932 | 0.0374 |
1359
+ | 0.9904 | 933 | 0.0374 |
1360
+ | 0.9915 | 934 | 0.0504 |
1361
+ | 0.9926 | 935 | 0.056 |
1362
+ | 0.9936 | 936 | 0.0478 |
1363
+ | 0.9947 | 937 | 0.0286 |
1364
+ | 0.9958 | 938 | 0.0415 |
1365
+ | 0.9968 | 939 | 0.037 |
1366
+ | 0.9979 | 940 | 0.0445 |
1367
+ | 0.9989 | 941 | 0.0451 |
1368
+ | 1.0 | 942 | 0.036 |
1369
+ | 1.0011 | 943 | 0.0346 |
1370
+ | 1.0021 | 944 | 0.044 |
1371
+ | 1.0032 | 945 | 0.044 |
1372
+ | 1.0042 | 946 | 0.0487 |
1373
+ | 1.0053 | 947 | 0.0411 |
1374
+ | 1.0064 | 948 | 0.0385 |
1375
+ | 1.0074 | 949 | 0.0414 |
1376
+ | 1.0085 | 950 | 0.0369 |
1377
+ | 1.0096 | 951 | 0.0381 |
1378
+ | 1.0106 | 952 | 0.0358 |
1379
+ | 1.0117 | 953 | 0.0455 |
1380
+ | 1.0127 | 954 | 0.0414 |
1381
+ | 1.0138 | 955 | 0.0327 |
1382
+ | 1.0149 | 956 | 0.0492 |
1383
+ | 1.0159 | 957 | 0.0552 |
1384
+ | 1.0170 | 958 | 0.0399 |
1385
+ | 1.0180 | 959 | 0.0442 |
1386
+ | 1.0191 | 960 | 0.0398 |
1387
+ | 1.0202 | 961 | 0.0418 |
1388
+ | 1.0212 | 962 | 0.037 |
1389
+ | 1.0223 | 963 | 0.0433 |
1390
+ | 1.0234 | 964 | 0.0405 |
1391
+ | 1.0244 | 965 | 0.0429 |
1392
+ | 1.0255 | 966 | 0.0364 |
1393
+ | 1.0265 | 967 | 0.0424 |
1394
+ | 1.0276 | 968 | 0.0419 |
1395
+ | 1.0287 | 969 | 0.044 |
1396
+ | 1.0297 | 970 | 0.0326 |
1397
+ | 1.0308 | 971 | 0.0391 |
1398
+ | 1.0318 | 972 | 0.0436 |
1399
+ | 1.0329 | 973 | 0.0466 |
1400
+ | 1.0340 | 974 | 0.0357 |
1401
+ | 1.0350 | 975 | 0.0562 |
1402
+ | 1.0361 | 976 | 0.0328 |
1403
+ | 1.0372 | 977 | 0.0423 |
1404
+ | 1.0382 | 978 | 0.0316 |
1405
+ | 1.0393 | 979 | 0.0488 |
1406
+ | 1.0403 | 980 | 0.0352 |
1407
+ | 1.0414 | 981 | 0.0383 |
1408
+ | 1.0425 | 982 | 0.0544 |
1409
+ | 1.0435 | 983 | 0.0336 |
1410
+ | 1.0446 | 984 | 0.0426 |
1411
+ | 1.0456 | 985 | 0.0301 |
1412
+ | 1.0467 | 986 | 0.048 |
1413
+ | 1.0478 | 987 | 0.0398 |
1414
+ | 1.0488 | 988 | 0.048 |
1415
+ | 1.0499 | 989 | 0.0451 |
1416
+ | 1.0510 | 990 | 0.0477 |
1417
+ | 1.0520 | 991 | 0.0437 |
1418
+ | 1.0531 | 992 | 0.0367 |
1419
+ | 1.0541 | 993 | 0.0438 |
1420
+ | 1.0552 | 994 | 0.0482 |
1421
+ | 1.0563 | 995 | 0.0445 |
1422
+ | 1.0573 | 996 | 0.0499 |
1423
+ | 1.0584 | 997 | 0.0409 |
1424
+ | 1.0594 | 998 | 0.0426 |
1425
+ | 1.0605 | 999 | 0.0417 |
1426
+ | 1.0616 | 1000 | 0.0498 |
1427
+
1428
+ </details>
1429
+
1430
+ ### Framework Versions
1431
+ - Python: 3.10.12
1432
+ - Sentence Transformers: 3.2.1
1433
+ - Transformers: 4.44.2
1434
+ - PyTorch: 2.3.1+cu121
1435
+ - Accelerate: 1.1.1
1436
+ - Datasets: 2.21.0
1437
+ - Tokenizers: 0.19.1
1438
+
1439
+ ## Citation
1440
+
1441
+ ### BibTeX
1442
+
1443
+ #### Sentence Transformers
1444
+ ```bibtex
1445
+ @inproceedings{reimers-2019-sentence-bert,
1446
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
1447
+ author = "Reimers, Nils and Gurevych, Iryna",
1448
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
1449
+ month = "11",
1450
+ year = "2019",
1451
+ publisher = "Association for Computational Linguistics",
1452
+ url = "https://arxiv.org/abs/1908.10084",
1453
+ }
1454
+ ```
1455
+
1456
+ #### MultipleNegativesRankingLoss
1457
+ ```bibtex
1458
+ @misc{henderson2017efficient,
1459
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
1460
+ author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
1461
+ year={2017},
1462
+ eprint={1705.00652},
1463
+ archivePrefix={arXiv},
1464
+ primaryClass={cs.CL}
1465
+ }
1466
+ ```
1467
+
1468
+ <!--
1469
+ ## Glossary
1470
+
1471
+ *Clearly define terms in order to be accessible across audiences.*
1472
+ -->
1473
+
1474
+ <!--
1475
+ ## Model Card Authors
1476
+
1477
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
1478
+ -->
1479
+
1480
+ <!--
1481
+ ## Model Card Contact
1482
+
1483
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
1484
+ -->
config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "models/gte--noneg-v0-bs512-lr5e-5-epoch3/checkpoint-1000",
3
+ "architectures": [
4
+ "NewModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "auto_map": {
8
+ "AutoConfig": "configuration.NewConfig",
9
+ "AutoModel": "modeling.NewModel",
10
+ "AutoModelForMaskedLM": "Alibaba-NLP/new-impl--modeling.NewForMaskedLM",
11
+ "AutoModelForMultipleChoice": "Alibaba-NLP/new-impl--modeling.NewForMultipleChoice",
12
+ "AutoModelForQuestionAnswering": "Alibaba-NLP/new-impl--modeling.NewForQuestionAnswering",
13
+ "AutoModelForSequenceClassification": "Alibaba-NLP/new-impl--modeling.NewForSequenceClassification",
14
+ "AutoModelForTokenClassification": "Alibaba-NLP/new-impl--modeling.NewForTokenClassification"
15
+ },
16
+ "classifier_dropout": 0.0,
17
+ "hidden_act": "gelu",
18
+ "hidden_dropout_prob": 0.1,
19
+ "hidden_size": 768,
20
+ "id2label": {
21
+ "0": "LABEL_0"
22
+ },
23
+ "initializer_range": 0.02,
24
+ "intermediate_size": 3072,
25
+ "label2id": {
26
+ "LABEL_0": 0
27
+ },
28
+ "layer_norm_eps": 1e-12,
29
+ "layer_norm_type": "layer_norm",
30
+ "logn_attention_clip1": false,
31
+ "logn_attention_scale": false,
32
+ "max_position_embeddings": 8192,
33
+ "model_type": "new",
34
+ "num_attention_heads": 12,
35
+ "num_hidden_layers": 12,
36
+ "pack_qkv": true,
37
+ "pad_token_id": 1,
38
+ "position_embedding_type": "rope",
39
+ "rope_scaling": {
40
+ "factor": 8.0,
41
+ "type": "ntk"
42
+ },
43
+ "rope_theta": 20000,
44
+ "torch_dtype": "float32",
45
+ "transformers_version": "4.44.2",
46
+ "type_vocab_size": 1,
47
+ "unpad_inputs": false,
48
+ "use_memory_efficient_attention": false,
49
+ "vocab_size": 250048
50
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.2.1",
4
+ "transformers": "4.44.2",
5
+ "pytorch": "2.3.1+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
configuration.py ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2024 The GTE Team Authors and Alibaba Group.
3
+ # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ """ NEW model configuration"""
17
+ from transformers.configuration_utils import PretrainedConfig
18
+ from transformers.utils import logging
19
+
20
+ logger = logging.get_logger(__name__)
21
+
22
+
23
+ class NewConfig(PretrainedConfig):
24
+ r"""
25
+ This is the configuration class to store the configuration of a [`NewModel`] or a [`TFNewModel`]. It is used to
26
+ instantiate a NEW model according to the specified arguments, defining the model architecture. Instantiating a
27
+ configuration with the defaults will yield a similar configuration to that of the NEW
28
+ [izhx/new-base-en](https://huggingface.co/izhx/new-base-en) architecture.
29
+
30
+ Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
31
+ documentation from [`PretrainedConfig`] for more information.
32
+
33
+
34
+ Args:
35
+ vocab_size (`int`, *optional*, defaults to 30522):
36
+ Vocabulary size of the NEW model. Defines the number of different tokens that can be represented by the
37
+ `inputs_ids` passed when calling [`NewModel`] or [`TFNewModel`].
38
+ hidden_size (`int`, *optional*, defaults to 768):
39
+ Dimensionality of the encoder layers and the pooler layer.
40
+ num_hidden_layers (`int`, *optional*, defaults to 12):
41
+ Number of hidden layers in the Transformer encoder.
42
+ num_attention_heads (`int`, *optional*, defaults to 12):
43
+ Number of attention heads for each attention layer in the Transformer encoder.
44
+ intermediate_size (`int`, *optional*, defaults to 3072):
45
+ Dimensionality of the "intermediate" (often named feed-forward) layer in the Transformer encoder.
46
+ hidden_act (`str` or `Callable`, *optional*, defaults to `"gelu"`):
47
+ The non-linear activation function (function or string) in the encoder and pooler. If string, `"gelu"`,
48
+ `"relu"`, `"silu"` and `"gelu_new"` are supported.
49
+ hidden_dropout_prob (`float`, *optional*, defaults to 0.1):
50
+ The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.
51
+ attention_probs_dropout_prob (`float`, *optional*, defaults to 0.1):
52
+ The dropout ratio for the attention probabilities.
53
+ max_position_embeddings (`int`, *optional*, defaults to 512):
54
+ The maximum sequence length that this model might ever be used with. Typically set this to something large
55
+ just in case (e.g., 512 or 1024 or 2048).
56
+ type_vocab_size (`int`, *optional*, defaults to 2):
57
+ The vocabulary size of the `token_type_ids` passed when calling [`NewModel`] or [`TFNewModel`].
58
+ initializer_range (`float`, *optional*, defaults to 0.02):
59
+ The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
60
+ layer_norm_eps (`float`, *optional*, defaults to 1e-12):
61
+ The epsilon used by the layer normalization layers.
62
+ position_embedding_type (`str`, *optional*, defaults to `"rope"`):
63
+ Type of position embedding. Choose one of `"absolute"`, `"rope"`.
64
+ rope_theta (`float`, *optional*, defaults to 10000.0):
65
+ The base period of the RoPE embeddings.
66
+ rope_scaling (`Dict`, *optional*):
67
+ Dictionary containing the scaling configuration for the RoPE embeddings. Currently supports two scaling
68
+ strategies: linear and dynamic. Their scaling factor must be a float greater than 1. The expected format is
69
+ `{"type": strategy name, "factor": scaling factor}`. When using this flag, don't update
70
+ `max_position_embeddings` to the expected new maximum. See the following thread for more information on how
71
+ these scaling strategies behave:
72
+ https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/. This is an
73
+ experimental feature, subject to breaking API changes in future versions.
74
+ classifier_dropout (`float`, *optional*):
75
+ The dropout ratio for the classification head.
76
+
77
+ Examples:
78
+
79
+ ```python
80
+ >>> from transformers import NewConfig, NewModel
81
+
82
+ >>> # Initializing a NEW izhx/new-base-en style configuration
83
+ >>> configuration = NewConfig()
84
+
85
+ >>> # Initializing a model (with random weights) from the izhx/new-base-en style configuration
86
+ >>> model = NewModel(configuration)
87
+
88
+ >>> # Accessing the model configuration
89
+ >>> configuration = model.config
90
+ ```"""
91
+
92
+ model_type = "new"
93
+
94
+ def __init__(
95
+ self,
96
+ vocab_size=30528,
97
+ hidden_size=768,
98
+ num_hidden_layers=12,
99
+ num_attention_heads=12,
100
+ intermediate_size=3072,
101
+ hidden_act="gelu",
102
+ hidden_dropout_prob=0.1,
103
+ attention_probs_dropout_prob=0.0,
104
+ max_position_embeddings=2048,
105
+ type_vocab_size=1,
106
+ initializer_range=0.02,
107
+ layer_norm_type='layer_norm',
108
+ layer_norm_eps=1e-12,
109
+ # pad_token_id=0,
110
+ position_embedding_type="rope",
111
+ rope_theta=10000.0,
112
+ rope_scaling=None,
113
+ classifier_dropout=None,
114
+ pack_qkv=True,
115
+ unpad_inputs=False,
116
+ use_memory_efficient_attention=False,
117
+ logn_attention_scale=False,
118
+ logn_attention_clip1=False,
119
+ **kwargs,
120
+ ):
121
+ super().__init__(**kwargs)
122
+
123
+ self.vocab_size = vocab_size
124
+ self.hidden_size = hidden_size
125
+ self.num_hidden_layers = num_hidden_layers
126
+ self.num_attention_heads = num_attention_heads
127
+ self.hidden_act = hidden_act
128
+ self.intermediate_size = intermediate_size
129
+ self.hidden_dropout_prob = hidden_dropout_prob
130
+ self.attention_probs_dropout_prob = attention_probs_dropout_prob
131
+ self.max_position_embeddings = max_position_embeddings
132
+ self.type_vocab_size = type_vocab_size
133
+ self.initializer_range = initializer_range
134
+ self.layer_norm_type = layer_norm_type
135
+ self.layer_norm_eps = layer_norm_eps
136
+ self.position_embedding_type = position_embedding_type
137
+ self.rope_theta = rope_theta
138
+ self.rope_scaling = rope_scaling
139
+ self.classifier_dropout = classifier_dropout
140
+
141
+ self.pack_qkv = pack_qkv
142
+ self.unpad_inputs = unpad_inputs
143
+ self.use_memory_efficient_attention = use_memory_efficient_attention
144
+ self.logn_attention_scale = logn_attention_scale
145
+ self.logn_attention_clip1 = logn_attention_clip1
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6b638fc16f1ded763c1a016fa12f6fd100d8d940e4a26b7fc036ebec58229b7
3
+ size 1221487872
modeling.py ADDED
@@ -0,0 +1,1418 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2024 The GTE Team Authors and Alibaba Group.
3
+ # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ """PyTorch NEW model."""
17
+
18
+ import math
19
+ from dataclasses import dataclass
20
+ from typing import List, Optional, Tuple, Union
21
+
22
+ import torch
23
+ import torch.utils.checkpoint
24
+ from torch import nn
25
+
26
+ from transformers.activations import ACT2FN
27
+ from transformers.modeling_outputs import (
28
+ BaseModelOutput,
29
+ BaseModelOutputWithPooling,
30
+ MaskedLMOutput,
31
+ MultipleChoiceModelOutput,
32
+ QuestionAnsweringModelOutput,
33
+ SequenceClassifierOutput,
34
+ ModelOutput,
35
+ )
36
+ from transformers.modeling_utils import PreTrainedModel
37
+ from transformers.utils import logging
38
+
39
+ try:
40
+ import xformers.ops as xops
41
+ except ImportError as e:
42
+ xops = None
43
+
44
+ from .configuration import NewConfig
45
+
46
+
47
+ logger = logging.get_logger(__name__)
48
+
49
+
50
+ # Adapted from https://github.com/HazyResearch/flash-attention/blob/main/flash_attn/bert_padding.py
51
+ # Which was adapted from https://github.com/mlcommons/training_results_v1.1/blob/main/NVIDIA/benchmarks/bert/implementations/pytorch/padding.py
52
+ class IndexFirstAxis(torch.autograd.Function):
53
+ @staticmethod
54
+ def forward(ctx, input, indices):
55
+ ctx.save_for_backward(indices)
56
+ assert input.ndim >= 2
57
+ ctx.first_axis_dim, other_shape = input.shape[0], input.shape[1:]
58
+ second_dim = other_shape.numel()
59
+ # TD [2022-03-04] For some reason torch.gather is a bit faster than indexing.
60
+ # return input[indices]
61
+ # return torch.gather(
62
+ # rearrange(input, "b ... -> b (...)"), 0, repeat(indices, "z -> z d", d=second_dim)
63
+ # ).reshape(-1, *other_shape)
64
+ return torch.gather(
65
+ input.view(ctx.first_axis_dim, second_dim),
66
+ 0,
67
+ indices.unsqueeze(-1).expand(indices.size(0), second_dim)
68
+ ).reshape(-1, *other_shape)
69
+
70
+ @staticmethod
71
+ def backward(ctx, grad_output):
72
+ (indices,) = ctx.saved_tensors
73
+ assert grad_output.ndim >= 2
74
+ other_shape = grad_output.shape[1:]
75
+ # grad_output = rearrange(grad_output, "b ... -> b (...)")
76
+ grad_output = grad_output.view(grad_output.size(0), other_shape.numel())
77
+ grad_input = torch.zeros(
78
+ [ctx.first_axis_dim, grad_output.shape[1]],
79
+ device=grad_output.device,
80
+ dtype=grad_output.dtype,
81
+ )
82
+ # TD [2022-03-04] For some reason torch.scatter is a bit faster than indexing.
83
+ # grad_input[indices] = grad_output
84
+ # grad_input.scatter_(0, repeat(indices, "z -> z d", d=grad_output.shape[1]), grad_output)
85
+ grad_input.scatter_(
86
+ 0, indices.unsqueeze(-1).expand(indices.size(0), grad_output.size(1)), grad_output
87
+ )
88
+ return grad_input.reshape(ctx.first_axis_dim, *other_shape), None
89
+
90
+
91
+ index_first_axis = IndexFirstAxis.apply
92
+
93
+
94
+ def unpad_input(hidden_states, attention_mask=None, indices=None):
95
+ """
96
+ Arguments:
97
+ hidden_states: (batch, seqlen, ...)
98
+ attention_mask: (batch, seqlen), bool / int, 1 means valid and 0 means not valid.
99
+ indices: (total_nnz), the indices of non-masked tokens from the flattened input sequence.
100
+ Return:
101
+ hidden_states: (total_nnz, ...), where total_nnz = number of tokens in selected in attention_mask.
102
+ """
103
+ if indices is None:
104
+ assert attention_mask is not None
105
+ indices = torch.nonzero(attention_mask.flatten(), as_tuple=False).flatten()
106
+
107
+ # TD [2022-03-04] We don't want to index with a bool mask, because Pytorch will expand the
108
+ # bool mask, then call nonzero to get the indices, then index with those. The indices is @dim
109
+ # times larger than it needs to be, wasting memory. It's faster and more memory-efficient to
110
+ # index with integer indices. Moreover, torch's index is a bit slower than it needs to be,
111
+ # so we write custom forward and backward to make it a bit faster.
112
+ hidden_states = hidden_states.view(-1, *hidden_states.shape[2:])
113
+ return index_first_axis(hidden_states, indices)
114
+
115
+
116
+ class IndexPutFirstAxis(torch.autograd.Function):
117
+ @staticmethod
118
+ def forward(
119
+ ctx,
120
+ values: torch.Tensor,
121
+ indices: torch.Tensor,
122
+ first_axis_dim
123
+ ) -> torch.Tensor:
124
+ ctx.save_for_backward(indices)
125
+ assert indices.ndim == 1
126
+ assert values.ndim >= 2
127
+ output = torch.zeros(
128
+ first_axis_dim, *values.shape[1:], device=values.device, dtype=values.dtype
129
+ )
130
+ output[indices] = values
131
+ return output
132
+
133
+ @staticmethod
134
+ def backward(ctx, grad_output: torch.Tensor) -> Tuple[torch.Tensor, None, None]:
135
+ indices, = ctx.saved_tensors
136
+ grad_values = grad_output[indices]
137
+ return grad_values, None, None
138
+
139
+
140
+ index_put_first_axis = IndexPutFirstAxis.apply
141
+
142
+
143
+ def pad_input(inputs: torch.Tensor, indices: torch.Tensor, batch: int, seqlen: int) -> torch.Tensor:
144
+ """Add padding to sequences.
145
+
146
+ Arguments:
147
+ inputs: (total_nnz, ...), where total_nnz = number of tokens in selected in attention_mask.
148
+ indices: (total_nnz), `indices = torch.nonzero(attention_mask.flatten(), as_tuple=False).flatten()`
149
+ batch: int batch_size
150
+ seqlen: int max sequence length
151
+
152
+ Returns:
153
+ inputs: (batch, seqlen, ...)
154
+ """
155
+ output = index_put_first_axis(inputs, indices, batch * seqlen)
156
+ return output.view(batch, seqlen, *inputs.shape[1:])
157
+
158
+
159
+ def rotate_half(x):
160
+ """Rotates half the hidden dims of the input."""
161
+ x1 = x[..., : x.shape[-1] // 2]
162
+ x2 = x[..., x.shape[-1] // 2 :]
163
+ return torch.cat((-x2, x1), dim=-1)
164
+
165
+
166
+ def apply_rotary_pos_emb(q, k, cos, sin):
167
+ """Applies Rotary Position Embedding to the query and key tensors.
168
+
169
+ Args:
170
+ q (`torch.Tensor`): The query tensor.
171
+ k (`torch.Tensor`): The key tensor.
172
+ cos (`torch.Tensor`): The cosine part of the rotary embedding.
173
+ sin (`torch.Tensor`): The sine part of the rotary embedding.
174
+ Returns:
175
+ `tuple(torch.Tensor)` comprising of the query and key tensors rotated using the Rotary Position Embedding.
176
+ """
177
+ cos, sin = cos.to(q.dtype), sin.to(q.dtype)
178
+ q_embed = (q * cos) + (rotate_half(q) * sin)
179
+ k_embed = (k * cos) + (rotate_half(k) * sin)
180
+ return q_embed, k_embed
181
+
182
+
183
+ class RotaryEmbedding(torch.nn.Module):
184
+ def __init__(self, dim, max_position_embeddings=512, base=10000.0, device=None):
185
+ super().__init__()
186
+
187
+ self.dim = dim
188
+ self.max_position_embeddings = max_position_embeddings
189
+ self.base = base
190
+ inv_freq = 1.0 / (self.base ** (torch.arange(0, self.dim, 2).float().to(device) / self.dim))
191
+ self.register_buffer("inv_freq", inv_freq, persistent=False)
192
+
193
+ # Build here to make `torch.jit.trace` work.
194
+ self._set_cos_sin_cache(
195
+ seq_len=max_position_embeddings, device=self.inv_freq.device, dtype=torch.get_default_dtype()
196
+ )
197
+
198
+ def _set_cos_sin_cache(self, seq_len, device, dtype):
199
+ self.max_seq_len_cached = seq_len
200
+ t = torch.arange(self.max_seq_len_cached, device=device, dtype=torch.float32)
201
+
202
+ freqs = torch.einsum("i,j->ij", t, self.inv_freq)
203
+ # Different from paper, but it uses a different permutation in order to obtain the same calculation
204
+ emb = torch.cat((freqs, freqs), dim=-1)
205
+ self.register_buffer("cos_cached", emb.cos().to(dtype), persistent=False)
206
+ self.register_buffer("sin_cached", emb.sin().to(dtype), persistent=False)
207
+
208
+ def forward(self, x, seq_len=None):
209
+ # x: [bs, num_attention_heads, seq_len, head_size]
210
+ if seq_len > self.max_seq_len_cached:
211
+ self._set_cos_sin_cache(seq_len=seq_len, device=x.device, dtype=x.dtype)
212
+
213
+ return (
214
+ self.cos_cached[:seq_len, ...].to(dtype=x.dtype),
215
+ self.sin_cached[:seq_len, ...].to(dtype=x.dtype),
216
+ )
217
+
218
+
219
+ class NTKScalingRotaryEmbedding(RotaryEmbedding):
220
+ """RotaryEmbedding extended with fixed and mixed NTK scaling. https://kexue.fm/archives/9706 """
221
+
222
+ def __init__(self, dim, max_position_embeddings=512, base=10000, device=None, scaling_factor=1.0, mixed_b=None):
223
+ self.scaling_factor = scaling_factor
224
+ self.mixed_b = mixed_b
225
+ super().__init__(dim, max_position_embeddings, base, device)
226
+ max_position_embeddings = max_position_embeddings * self.scaling_factor
227
+ self._set_cos_sin_cache(max_position_embeddings, self.inv_freq.device, torch.get_default_dtype())
228
+
229
+ def _set_cos_sin_cache(self, seq_len, device, dtype):
230
+ self.max_seq_len_cached = seq_len
231
+
232
+ if seq_len > self.max_position_embeddings:
233
+ base = self.base * (self.scaling_factor if self.mixed_b is None else 1)
234
+ inv_freq = 1.0 / (base ** (torch.arange(0, self.dim, 2).float().to(device) / self.dim))
235
+
236
+ if self.mixed_b is None:
237
+ inv_freq = inv_freq / self.scaling_factor ** (2 / self.dim) # (6)
238
+ else:
239
+ a = torch.tensor(self.scaling_factor).log() / (self.dim / 2) ** self.mixed_b # (13)
240
+ lambda_1_m = (a * torch.arange(1, self.dim // 2 + 1).float().to(device) ** self.mixed_b).exp() # (12)
241
+ inv_freq = inv_freq / lambda_1_m # (10)
242
+
243
+ self.register_buffer("inv_freq", inv_freq, persistent=False)
244
+
245
+ t = torch.arange(self.max_seq_len_cached, device=device, dtype=torch.float32)
246
+
247
+ freqs = torch.einsum("i,j->ij", t, self.inv_freq)
248
+ # Different from paper, but it uses a different permutation in order to obtain the same calculation
249
+ emb = torch.cat((freqs, freqs), dim=-1)
250
+ self.register_buffer("cos_cached", emb.cos().to(dtype), persistent=False)
251
+ self.register_buffer("sin_cached", emb.sin().to(dtype), persistent=False)
252
+
253
+
254
+ class RMSNorm(nn.Module):
255
+ def __init__(self, hidden_size, eps=1e-6):
256
+ """
257
+ RMSNorm is equivalent to T5LayerNorm
258
+ """
259
+ super().__init__()
260
+ self.weight = nn.Parameter(torch.ones(hidden_size))
261
+ self.variance_epsilon = eps
262
+
263
+ def forward(self, hidden_states):
264
+ input_dtype = hidden_states.dtype
265
+ hidden_states = hidden_states.to(torch.float32)
266
+ variance = hidden_states.pow(2).mean(-1, keepdim=True)
267
+ hidden_states = hidden_states * torch.rsqrt(variance + self.variance_epsilon)
268
+ return self.weight * hidden_states.to(input_dtype)
269
+
270
+
271
+ LAYER_NORM = {
272
+ 'layer_norm': nn.LayerNorm,
273
+ 'rms_norm': RMSNorm
274
+ }
275
+
276
+
277
+ class NewEmbeddings(nn.Module):
278
+ """
279
+ Embedding and Unpadding.
280
+ """
281
+
282
+ def __init__(self, config: NewConfig):
283
+ super().__init__()
284
+ self.padding_idx = config.pad_token_id
285
+ self.word_embeddings = nn.Embedding(
286
+ config.vocab_size, config.hidden_size, padding_idx=self.padding_idx
287
+ )
288
+
289
+ self.position_embedding_type = config.position_embedding_type
290
+ if self.position_embedding_type == 'absolute':
291
+ self.position_embeddings = nn.Embedding(
292
+ config.max_position_embeddings, config.hidden_size, padding_idx=self.padding_idx
293
+ )
294
+ elif self.position_embedding_type == 'rope':
295
+ self._init_rope(config)
296
+ else:
297
+ raise ValueError
298
+
299
+ self.type_vocab_size = config.type_vocab_size
300
+ if self.type_vocab_size > 0:
301
+ self.token_type_embeddings = nn.Embedding(config.type_vocab_size, config.hidden_size)
302
+
303
+ # self.LayerNorm is not snake-cased to stick with TensorFlow model variable name and be able to load
304
+ # any TensorFlow checkpoint file
305
+ self.LayerNorm = nn.LayerNorm(config.hidden_size, eps=config.layer_norm_eps)
306
+ self.dropout = nn.Dropout(config.hidden_dropout_prob)
307
+ # position_ids is contiguous in memory and excluded when serialized
308
+ self.register_buffer(
309
+ "position_ids", torch.arange(config.max_position_embeddings), persistent=False
310
+ )
311
+
312
+ def _init_rope(self, config):
313
+ kwargs = dict(
314
+ dim=int(config.hidden_size / config.num_attention_heads),
315
+ max_position_embeddings=config.max_position_embeddings,
316
+ base=config.rope_theta
317
+ )
318
+ if config.rope_scaling is None:
319
+ self.rotary_emb = RotaryEmbedding(**kwargs)
320
+ else:
321
+ kwargs.update(scaling_factor=config.rope_scaling["factor"])
322
+ scaling_type = config.rope_scaling["type"]
323
+ if scaling_type == 'ntk':
324
+ kwargs.update(mixed_b=config.rope_scaling.get('mixed_b', None))
325
+ self.rotary_emb = NTKScalingRotaryEmbedding(**kwargs)
326
+ # elif scaling_type == "linear":
327
+ # self.rotary_emb = LinearScalingRotaryEmbedding(**kwargs)
328
+ # elif scaling_type == "dynamic":
329
+ # self.rotary_emb = DynamicNTKScalingRotaryEmbedding(**kwargs)
330
+ else:
331
+ raise ValueError(f"Unknown RoPE scaling type {scaling_type}")
332
+
333
+ def forward(
334
+ self,
335
+ unpad_inputs: bool,
336
+ input_ids: Optional[torch.Tensor] = None,
337
+ attention_mask: Optional[torch.Tensor] = None,
338
+ length: Optional[List[int]] = None,
339
+ token_type_ids: Optional[torch.Tensor] = None,
340
+ position_ids: Optional[torch.Tensor] = None,
341
+ inputs_embeds: Optional[torch.Tensor] = None,
342
+ ) -> Tuple[torch.Tensor, torch.Tensor, Optional[Tuple], Optional[List[int]]]:
343
+ """
344
+ """
345
+ if inputs_embeds is None:
346
+ device, input_shape = input_ids.device, input_ids.shape
347
+ else:
348
+ device, input_shape = inputs_embeds.device, inputs_embeds.shape[:2]
349
+ batch_size, seq_length = input_shape
350
+
351
+ # Set attention_mask if it's None
352
+ if attention_mask is None:
353
+ attention_mask = torch.ones(input_shape, device=device)
354
+ if length is not None:
355
+ for i, l in enumerate(length):
356
+ attention_mask[i, l:] = 0
357
+
358
+ # Set attention_mask_bool for unpadding
359
+ if unpad_inputs:
360
+ attention_mask_bool = attention_mask.bool()
361
+ if length is None:
362
+ length = attention_mask.sum(-1).tolist()
363
+
364
+ # Get word embeddings
365
+ if inputs_embeds is None:
366
+ if unpad_inputs:
367
+ input_ids = input_ids[attention_mask_bool].unsqueeze(0)
368
+ inputs_embeds = self.word_embeddings(input_ids)
369
+ else:
370
+ if unpad_inputs:
371
+ inputs_embeds = inputs_embeds[attention_mask_bool].unsqueeze(0)
372
+ embeddings = inputs_embeds
373
+
374
+ # Set and unpad position_ids
375
+ if position_ids is None:
376
+ if seq_length > self.position_ids.size(0):
377
+ self.register_buffer(
378
+ "position_ids", torch.arange(seq_length, device=embeddings.device), persistent=False
379
+ )
380
+ if unpad_inputs:
381
+ # [1, cumsum_seq_len]
382
+ position_ids = torch.cat([self.position_ids[:l] for l in length]).unsqueeze(0)
383
+ else:
384
+ # [bs, seq_len]
385
+ position_ids = self.position_ids[:seq_length].expand(batch_size, -1)
386
+ elif unpad_inputs:
387
+ position_ids = position_ids[attention_mask_bool].unsqueeze(0) # [1, cumsum_seq_len]
388
+
389
+ # Compute rotary embedding
390
+ if self.position_embedding_type == 'rope':
391
+ rope_cos, rope_sin = self.rotary_emb(inputs_embeds, seq_len=seq_length)
392
+ rope_cos = rope_cos[position_ids].unsqueeze(2) # [bs, seq_len, 1, dim]
393
+ rope_sin = rope_sin[position_ids].unsqueeze(2) # [bs, seq_len, 1, dim]
394
+ rope_embeds = rope_cos, rope_sin
395
+ else:
396
+ rope_embeds = None
397
+
398
+ if self.type_vocab_size > 0:
399
+ if token_type_ids is None:
400
+ token_type_ids = position_ids.mul(0)
401
+ else:
402
+ if self.type_vocab_size < 2:
403
+ token_type_ids.mul_(0)
404
+ if unpad_inputs:
405
+ token_type_ids = token_type_ids[attention_mask_bool].unsqueeze(0)
406
+
407
+ token_type_embeddings = self.token_type_embeddings(token_type_ids)
408
+ embeddings = embeddings + token_type_embeddings
409
+
410
+ # BERT position
411
+ if self.position_embedding_type == "absolute":
412
+ position_embeddings = self.position_embeddings(position_ids)
413
+ embeddings = embeddings + position_embeddings
414
+
415
+ embeddings = self.LayerNorm(embeddings)
416
+ embeddings = self.dropout(embeddings)
417
+
418
+ return embeddings, attention_mask, rope_embeds, length
419
+
420
+
421
+ class NewAttention(nn.Module):
422
+ def __init__(self, config: NewConfig, pack_qkv=None, use_memory_efficient_attention=None):
423
+ super().__init__()
424
+ self.config = config
425
+ if config.hidden_size % config.num_attention_heads != 0 and not hasattr(config, "embedding_size"):
426
+ raise ValueError(
427
+ f"The hidden size ({config.hidden_size}) is not a multiple of the number of attention "
428
+ f"heads ({config.num_attention_heads})"
429
+ )
430
+
431
+ self.hidden_size = config.hidden_size
432
+ self.num_attention_heads = config.num_attention_heads
433
+ self.attention_head_size = int(config.hidden_size / config.num_attention_heads)
434
+ self.all_head_size = self.num_attention_heads * self.attention_head_size
435
+
436
+ if pack_qkv is None:
437
+ pack_qkv = config.pack_qkv
438
+ self.pack_qkv = pack_qkv
439
+
440
+ if self.pack_qkv:
441
+ self.qkv_proj = nn.Linear(config.hidden_size, self.all_head_size * 3, bias=True)
442
+ else:
443
+ self.q_proj = nn.Linear(config.hidden_size, self.all_head_size, bias=True)
444
+ self.k_proj = nn.Linear(config.hidden_size, self.all_head_size, bias=True)
445
+ self.v_proj = nn.Linear(config.hidden_size, self.all_head_size, bias=True)
446
+
447
+ self.dropout = nn.Dropout(config.attention_probs_dropout_prob)
448
+ self.o_proj = nn.Linear(config.hidden_size, config.hidden_size, bias=True)
449
+
450
+ if use_memory_efficient_attention is None:
451
+ use_memory_efficient_attention = self.config.use_memory_efficient_attention
452
+ self.use_memory_efficient_attention = use_memory_efficient_attention
453
+ self.memory_efficient_attention = None if xops is None else xops.memory_efficient_attention
454
+ if self.use_memory_efficient_attention:
455
+ assert self.memory_efficient_attention is not None, 'please install xformers'
456
+
457
+ def forward(
458
+ self,
459
+ hidden_states: torch.Tensor,
460
+ attention_bias: torch.FloatTensor,
461
+ rope_embeds: Optional[Tuple[torch.FloatTensor, torch.FloatTensor]] = None,
462
+ padding_inputs: Optional[Tuple] = None, # indices, batch, seqlen
463
+ attention_scale: Optional[torch.FloatTensor] = None,
464
+ head_mask: Optional[torch.FloatTensor] = None,
465
+ output_attentions: Optional[bool] = False,
466
+ qkv_inputs: Optional[Tuple] = None, # For RetroMAE
467
+ ) -> Tuple[torch.Tensor, ...]:
468
+ shape_hd = (self.num_attention_heads, self.attention_head_size)
469
+ # qkv
470
+ if self.pack_qkv and qkv_inputs is None:
471
+ qkv_pack = self.qkv_proj(hidden_states).split(self.all_head_size, dim=-1)
472
+ else:
473
+ if qkv_inputs is None:
474
+ qkv_inputs = (hidden_states, hidden_states, hidden_states)
475
+ qkv_pack = [
476
+ getattr(self, n + '_proj')(s) for s, n in zip(qkv_inputs, 'qkv')
477
+ ]
478
+ query_states, key_states, value_states = [t.view(t.shape[:-1] + shape_hd) for t in qkv_pack]
479
+
480
+ if self.config.position_embedding_type == 'rope':
481
+ query_states, key_states = apply_rotary_pos_emb(query_states, key_states, *rope_embeds)
482
+
483
+ dtype = query_states.dtype
484
+
485
+ if self.config.logn_attention_scale and attention_scale is not None:
486
+ # https://kexue.fm/archives/8823
487
+ query_states = query_states * attention_scale.to(dtype)
488
+
489
+ if padding_inputs is not None:
490
+ query_states = pad_input(query_states.squeeze(), *padding_inputs)
491
+ key_states = pad_input(key_states.squeeze(), *padding_inputs)
492
+ value_states = pad_input(value_states.squeeze(), *padding_inputs)
493
+
494
+ if self.use_memory_efficient_attention:
495
+ assert self.memory_efficient_attention is not None, "xformers is not loaded"
496
+ assert output_attentions is False, "memory_efficient_attention do not output attentions"
497
+ assert head_mask is None, "Not support yet"
498
+ attention_probs = None
499
+ if torch.is_tensor(attention_bias):
500
+ attention_bias = attention_bias.to(dtype)
501
+ context_layer = self.memory_efficient_attention(
502
+ query_states,
503
+ key_states,
504
+ value_states,
505
+ attn_bias=attention_bias,
506
+ p=self.dropout.p
507
+ )
508
+ else:
509
+ if output_attentions and isinstance(self, NewSdpaAttention):
510
+ raise RuntimeError("SDPA do not output attentions")
511
+ context_layer, attention_probs = self._attention(
512
+ query_states, key_states, value_states, attention_bias, head_mask
513
+ )
514
+
515
+ if padding_inputs is not None:
516
+ context_layer = unpad_input(context_layer, indices=padding_inputs[0])
517
+
518
+ new_context_layer_shape = context_layer.size()[:-2] + (self.all_head_size,)
519
+ context_layer = context_layer.view(new_context_layer_shape)
520
+
521
+ # output proj
522
+ attn_output = self.o_proj(context_layer)
523
+
524
+ # add attentions if we output them
525
+ outputs = (attn_output, attention_probs) if output_attentions else (attn_output,)
526
+ return outputs
527
+
528
+ def _attention(self, query_states, key_states, value_states, attention_bias, head_mask):
529
+ """
530
+ Args:
531
+ q/k/v: (B, L, n_head, head_dim),
532
+ Returns:
533
+ attn_output: (B L, n_head, head_dim)
534
+ """
535
+ query_states = query_states.transpose(1, 2)
536
+ key_states = key_states.transpose(1, 2)
537
+ value_states = value_states.transpose(1, 2)
538
+ # Take the dot product between "query" and "key" to get the raw attention scores.
539
+ attention_scores = torch.matmul(query_states, key_states.transpose(-1, -2))
540
+
541
+ attention_scores = attention_scores / math.sqrt(self.attention_head_size)
542
+ if attention_bias is not None:
543
+ # Apply the attention mask is (precomputed for all layers in BertModel forward() function)
544
+ attention_scores = attention_scores + attention_bias
545
+
546
+ # Normalize the attention scores to probabilities.
547
+ attention_probs = nn.functional.softmax(attention_scores, dim=-1)
548
+
549
+ # This is actually dropping out entire tokens to attend to, which might
550
+ # seem a bit unusual, but is taken from the original Transformer paper.
551
+ if self.dropout.p > 0:
552
+ attention_probs = self.dropout(attention_probs)
553
+
554
+ # Mask heads if we want to
555
+ if head_mask is not None:
556
+ attention_probs = attention_probs * head_mask
557
+
558
+ context_layer = torch.matmul(attention_probs, value_states)
559
+
560
+ context_layer = context_layer.permute(0, 2, 1, 3).contiguous()
561
+ return context_layer, attention_probs
562
+
563
+
564
+ class NewSdpaAttention(NewAttention):
565
+ """
566
+ New attention module using torch.nn.functional.scaled_dot_product_attention. This module inherits from
567
+ `NewAttention` as the weights of the module stays untouched. The only changes are on the forward pass to adapt to
568
+ SDPA API.
569
+ """
570
+ def __init__(self, config: NewConfig, **kwargs):
571
+ super().__init__(config, **kwargs)
572
+ # torch.backends.cuda.enable_mem_efficient_sdp(False)
573
+ # logger.warning(
574
+ # "Disable memory efficient attention kernel for `NewSdpaAttention`, you can set "
575
+ # "`use_memory_efficient_attention=True` if it expected to use."
576
+ # )
577
+
578
+ def _attention(self, query_states, key_states, value_states, attention_bias, head_mask):
579
+ attn_output = torch.nn.functional.scaled_dot_product_attention(
580
+ query_states.transpose(1, 2),
581
+ key_states.transpose(1, 2),
582
+ value_states.transpose(1, 2),
583
+ attn_mask=attention_bias,
584
+ dropout_p=self.dropout.p if self.training else 0.0,
585
+ )
586
+ attn_output = attn_output.permute(0, 2, 1, 3).contiguous()
587
+ return attn_output, None
588
+
589
+
590
+ NEW_ATTENTION_CLASSES = {
591
+ "eager": NewAttention,
592
+ # "flash_attention_2": , # TODO
593
+ "sdpa": NewSdpaAttention,
594
+ }
595
+
596
+
597
+ class NewGatedMLP(nn.Module):
598
+ """
599
+ GLU Variants Improve Transformer.
600
+ """
601
+
602
+ def __init__(self, config: NewConfig):
603
+ super().__init__()
604
+ self.intermediate_size = config.intermediate_size
605
+ self.up_gate_proj = nn.Linear(config.hidden_size, self.intermediate_size * 2, bias=False)
606
+ self.down_proj = nn.Linear(self.intermediate_size, config.hidden_size, bias=True)
607
+ self.act_fn = ACT2FN[config.hidden_act]
608
+ if config.hidden_dropout_prob > 0:
609
+ self.hidden_dropout = nn.Dropout(config.hidden_dropout_prob)
610
+ else:
611
+ self.hidden_dropout = None
612
+
613
+ def forward(self, hidden_states):
614
+ up_gate = self.up_gate_proj(hidden_states)
615
+ up_states, gate = torch.split(up_gate, self.intermediate_size, dim=-1)
616
+ gate = self.act_fn(gate)
617
+ gated_states = gate * up_states
618
+ if self.hidden_dropout is not None:
619
+ gated_states = self.hidden_dropout(gated_states)
620
+ down_states = self.down_proj(gated_states)
621
+ return down_states
622
+
623
+
624
+ class NewLayer(nn.Module):
625
+ def __init__(
626
+ self,
627
+ config: NewConfig,
628
+ pack_qkv=None,
629
+ use_memory_efficient_attention=None,
630
+ attn_implementation=None
631
+ ):
632
+ super().__init__()
633
+ if attn_implementation is None:
634
+ attn_implementation = config._attn_implementation
635
+ if use_memory_efficient_attention is None:
636
+ use_memory_efficient_attention = config.use_memory_efficient_attention
637
+ if use_memory_efficient_attention:
638
+ if attn_implementation != 'eager':
639
+ logger.warning_once(f"Override {attn_implementation=} to 'eager' as {use_memory_efficient_attention=}")
640
+ attn_implementation = 'eager' # Since it will be SDPA by default for torch>=2.1.1
641
+ self.attention = NEW_ATTENTION_CLASSES[attn_implementation](
642
+ config, pack_qkv=pack_qkv, use_memory_efficient_attention=use_memory_efficient_attention
643
+ )
644
+ self.mlp = NewGatedMLP(config)
645
+
646
+ ln_class = LAYER_NORM[config.layer_norm_type]
647
+ self.attn_ln = ln_class(config.hidden_size, eps=config.layer_norm_eps)
648
+ self.mlp_ln = ln_class(config.hidden_size, eps=config.layer_norm_eps)
649
+
650
+ if config.hidden_dropout_prob > 0:
651
+ self.hidden_dropout = nn.Dropout(config.hidden_dropout_prob)
652
+ else:
653
+ self.hidden_dropout = None
654
+
655
+ def forward(
656
+ self,
657
+ hidden_states: torch.Tensor,
658
+ attention_bias: torch.FloatTensor,
659
+ rope_embeds: Optional[Tuple[torch.FloatTensor, torch.FloatTensor]] = None,
660
+ padding_inputs: Optional[Tuple] = None, # indices, batch, seqlen
661
+ attention_scale: Optional[torch.FloatTensor] = None,
662
+ subset_indices: Optional[torch.LongTensor] = None,
663
+ head_mask: Optional[torch.FloatTensor] = None,
664
+ output_attentions: Optional[bool] = False,
665
+ qkv_inputs: Optional[Tuple] = None, # For RetroMAE
666
+ ) -> Tuple[torch.Tensor, ...]:
667
+ # Multi head self attention
668
+ residual = hidden_states if qkv_inputs is None else qkv_inputs[0]
669
+ attention_outputs = self.attention(
670
+ hidden_states,
671
+ attention_bias,
672
+ rope_embeds,
673
+ padding_inputs,
674
+ attention_scale,
675
+ head_mask,
676
+ output_attentions=output_attentions,
677
+ qkv_inputs=qkv_inputs,
678
+ )
679
+ hidden_states = attention_outputs[0]
680
+ if self.hidden_dropout is not None:
681
+ hidden_states = self.hidden_dropout(hidden_states)
682
+ hidden_states = residual + hidden_states
683
+
684
+ # In pretraining, after the attention of last layer, we only need the masked tokens.
685
+ if subset_indices is not None:
686
+ hidden_states = hidden_states[subset_indices]
687
+
688
+ hidden_states = self.attn_ln(hidden_states)
689
+
690
+ # Fully Connected
691
+ residual = hidden_states
692
+ hidden_states = self.mlp(hidden_states)
693
+ if self.hidden_dropout is not None:
694
+ hidden_states = self.hidden_dropout(hidden_states)
695
+ hidden_states = residual + hidden_states
696
+ hidden_states = self.mlp_ln(hidden_states)
697
+
698
+ # add self attentions if we output attention weights
699
+ outputs = (hidden_states,) + attention_outputs[1:]
700
+ return outputs
701
+
702
+
703
+ class NewEncoder(nn.Module):
704
+ def __init__(self, config):
705
+ super().__init__()
706
+ self.config = config
707
+ self.layer = nn.ModuleList([NewLayer(config) for _ in range(config.num_hidden_layers)])
708
+ self.gradient_checkpointing = False
709
+
710
+ def forward(
711
+ self,
712
+ hidden_states: torch.Tensor,
713
+ attention_bias: Optional[torch.FloatTensor] = None,
714
+ rope_embeds: Optional[Tuple[torch.FloatTensor, torch.FloatTensor]] = None,
715
+ padding_inputs: Optional[Tuple] = None, # indices, batch, seqlen
716
+ attention_scale: Optional[torch.FloatTensor] = None,
717
+ subset_indices: Optional[torch.LongTensor] = None,
718
+ head_mask: Optional[torch.FloatTensor] = None,
719
+ output_attentions: Optional[bool] = False,
720
+ output_hidden_states: Optional[bool] = False,
721
+ return_dict: Optional[bool] = True,
722
+ ) -> Union[Tuple[torch.Tensor], BaseModelOutput]:
723
+ all_hidden_states = () if output_hidden_states else None
724
+ all_self_attentions = () if output_attentions else None
725
+
726
+ for i, layer_module in enumerate(self.layer):
727
+ if output_hidden_states:
728
+ all_hidden_states = all_hidden_states + (hidden_states,)
729
+
730
+ if i >= len(self.layer) - 1:
731
+ layer_subset_indices = subset_indices
732
+ else:
733
+ layer_subset_indices = None
734
+
735
+ layer_head_mask = head_mask[i] if head_mask is not None else None
736
+
737
+ if self.gradient_checkpointing and self.training:
738
+ layer_outputs = self._gradient_checkpointing_func(
739
+ layer_module.__call__,
740
+ hidden_states,
741
+ attention_bias,
742
+ rope_embeds,
743
+ padding_inputs,
744
+ attention_scale,
745
+ layer_subset_indices,
746
+ layer_head_mask,
747
+ )
748
+ else:
749
+ layer_outputs = layer_module(
750
+ hidden_states,
751
+ attention_bias,
752
+ rope_embeds,
753
+ padding_inputs,
754
+ attention_scale,
755
+ layer_subset_indices,
756
+ layer_head_mask,
757
+ output_attentions,
758
+ )
759
+
760
+ hidden_states = layer_outputs[0]
761
+ if output_attentions:
762
+ all_self_attentions = all_self_attentions + (layer_outputs[1],)
763
+
764
+ if output_hidden_states:
765
+ all_hidden_states = all_hidden_states + (hidden_states,)
766
+
767
+ if not return_dict:
768
+ return tuple(
769
+ v
770
+ for v in [
771
+ hidden_states,
772
+ all_hidden_states,
773
+ all_self_attentions,
774
+ ]
775
+ if v is not None
776
+ )
777
+ return BaseModelOutput(
778
+ last_hidden_state=hidden_states,
779
+ hidden_states=all_hidden_states,
780
+ attentions=all_self_attentions,
781
+ )
782
+
783
+
784
+ # Copied from transformers.models.bert.modeling_bert.BertPooler with Bert->New
785
+ class NewPooler(nn.Module):
786
+ def __init__(self, config):
787
+ super().__init__()
788
+ self.dense = nn.Linear(config.hidden_size, config.hidden_size)
789
+ self.activation = nn.Tanh()
790
+
791
+ def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
792
+ # We "pool" the model by simply taking the hidden state corresponding
793
+ # to the first token.
794
+ first_token_tensor = hidden_states[:, 0]
795
+ pooled_output = self.dense(first_token_tensor)
796
+ pooled_output = self.activation(pooled_output)
797
+ return pooled_output
798
+
799
+
800
+ class NewPreTrainedModel(PreTrainedModel):
801
+ """
802
+ An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
803
+ models.
804
+ """
805
+
806
+ config_class = NewConfig
807
+ base_model_prefix = "new"
808
+ supports_gradient_checkpointing = True
809
+ _supports_sdpa = True
810
+
811
+ def _init_weights(self, module):
812
+ """Initialize the weights"""
813
+ if isinstance(module, nn.Linear):
814
+ # Slightly different from the TF version which uses truncated_normal for initialization
815
+ # cf https://github.com/pytorch/pytorch/pull/5617
816
+ module.weight.data.normal_(mean=0.0, std=self.config.initializer_range)
817
+ if module.bias is not None:
818
+ module.bias.data.zero_()
819
+ elif isinstance(module, nn.Embedding):
820
+ module.weight.data.normal_(mean=0.0, std=self.config.initializer_range)
821
+ if module.padding_idx is not None:
822
+ module.weight.data[module.padding_idx].zero_()
823
+ elif isinstance(module, nn.LayerNorm):
824
+ module.bias.data.zero_()
825
+ module.weight.data.fill_(1.0)
826
+
827
+
828
+ class NewModel(NewPreTrainedModel):
829
+ """
830
+ The bare New Model transformer outputting raw hidden-states without any specific head on top.
831
+ """
832
+
833
+ def __init__(self, config: NewConfig, add_pooling_layer=False):
834
+ super().__init__(config)
835
+ self.config = config
836
+
837
+ self.embeddings = NewEmbeddings(config)
838
+ self.encoder = NewEncoder(config)
839
+
840
+ self.pooler = NewPooler(config) if add_pooling_layer else None
841
+
842
+ # Initialize weights and apply final processing
843
+ self.post_init()
844
+
845
+ def get_input_embeddings(self):
846
+ return self.embeddings.word_embeddings
847
+
848
+ def set_input_embeddings(self, value):
849
+ self.embeddings.word_embeddings = value
850
+
851
+ def forward(
852
+ self,
853
+ input_ids: Optional[torch.Tensor] = None,
854
+ attention_mask: Optional[torch.Tensor] = None,
855
+ length: Optional[List[int]] = None,
856
+ subset_indices: Optional[torch.LongTensor] = None,
857
+ token_type_ids: Optional[torch.Tensor] = None,
858
+ position_ids: Optional[torch.Tensor] = None,
859
+ head_mask: Optional[torch.Tensor] = None,
860
+ inputs_embeds: Optional[torch.Tensor] = None,
861
+ output_attentions: Optional[bool] = None,
862
+ output_hidden_states: Optional[bool] = None,
863
+ return_dict: Optional[bool] = None,
864
+ unpad_inputs: Optional[bool] = None,
865
+ ) -> Union[Tuple[torch.Tensor], BaseModelOutputWithPooling]:
866
+ r"""
867
+ length (`list` of length `batch_size`, *optional*):
868
+ If is `None`, return padded `last_hidden_state`.
869
+ subset_indices ():
870
+ pass
871
+ unpad_inputs (`bool`, *optional*):
872
+ pass
873
+ """
874
+ output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
875
+ output_hidden_states = (
876
+ output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
877
+ )
878
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
879
+ unpad_inputs = unpad_inputs if unpad_inputs is not None else self.config.unpad_inputs
880
+ output_padded = length is None
881
+
882
+ if input_ids is not None and inputs_embeds is not None:
883
+ raise ValueError("You cannot specify both input_ids and inputs_embeds at the same time")
884
+ elif input_ids is not None:
885
+ self.warn_if_padding_and_no_attention_mask(input_ids, attention_mask)
886
+ input_shape = input_ids.size()
887
+ elif inputs_embeds is not None:
888
+ input_shape = inputs_embeds.size()[:-1]
889
+ else:
890
+ raise ValueError("You have to specify either input_ids or inputs_embeds")
891
+
892
+ # TODO: not used
893
+ # # Prepare head mask if needed
894
+ # # 1.0 in head_mask indicate we keep the head
895
+ # # attention_probs has shape bsz x n_heads x N x N
896
+ # # input head_mask has shape [num_heads] or [num_hidden_layers x num_heads]
897
+ # # and head_mask is converted to shape [num_hidden_layers x batch x num_heads x seq_length x seq_length]
898
+ # head_mask = self.get_head_mask(head_mask, self.config.num_hidden_layers)
899
+
900
+ # Get embeddings, may unpad them
901
+ (embedding_output, attention_mask, rope_embeds, length) = self.embeddings(
902
+ unpad_inputs,
903
+ input_ids=input_ids,
904
+ attention_mask=attention_mask,
905
+ length=length,
906
+ token_type_ids=token_type_ids,
907
+ position_ids=position_ids,
908
+ inputs_embeds=inputs_embeds
909
+ )
910
+
911
+ batch_size, seq_length = input_shape
912
+ if unpad_inputs and self.config.use_memory_efficient_attention:
913
+ attention_bias = xops.fmha.attn_bias.BlockDiagonalMask.from_seqlens(length)
914
+ else:
915
+ # We can provide a self-attention mask of dimensions [batch_size, from_seq_length, to_seq_length]
916
+ # ourselves in which case we just need to make it broadcastable to all heads.
917
+ attention_bias = self.get_extended_attention_mask(attention_mask, input_shape)
918
+ if self.config.use_memory_efficient_attention:
919
+ # Invalid shape for attention bias: torch.Size([48, 1, 1, 512]) (expected (48, 12, 512, 512))
920
+ attention_bias = attention_bias.expand(-1, self.config.num_attention_heads, seq_length, -1)
921
+
922
+ padding_inputs = None
923
+ if unpad_inputs and (output_padded or not self.config.use_memory_efficient_attention):
924
+ indices = torch.nonzero(attention_mask.flatten(), as_tuple=False).flatten()
925
+ if not self.config.use_memory_efficient_attention:
926
+ padding_inputs = (indices, *input_shape)
927
+
928
+ attention_scale = None
929
+ if self.config.logn_attention_scale:
930
+ logger.warning_once("TODO: logn_attention_scale")
931
+ # # attention scale log_512(input_len)
932
+ # attention_scale = attention_mask.sum(1).log() / torch.tensor(self.config.max_position_embeddings).log()
933
+ # # inference-time logn scale need clip 1
934
+ # if self.config.logn_attention_clip1:
935
+ # attention_scale.clip_(1)
936
+ # attention_scale = attention_scale[:, None, None, None]
937
+ # else:
938
+ # attention_scale = None
939
+
940
+ encoder_outputs = self.encoder(
941
+ embedding_output,
942
+ attention_bias=attention_bias,
943
+ rope_embeds=rope_embeds,
944
+ padding_inputs=padding_inputs,
945
+ attention_scale=attention_scale,
946
+ subset_indices=subset_indices,
947
+ head_mask=head_mask,
948
+ output_attentions=output_attentions,
949
+ output_hidden_states=output_hidden_states,
950
+ return_dict=return_dict,
951
+ )
952
+ sequence_output = encoder_outputs[0]
953
+ if unpad_inputs and output_padded:
954
+ sequence_output = pad_input(
955
+ sequence_output.squeeze(), indices, batch_size, seq_length
956
+ )
957
+
958
+ pooled_output = self.pooler(sequence_output) if self.pooler is not None else None
959
+
960
+ if not return_dict:
961
+ return (sequence_output, pooled_output) + encoder_outputs[1:]
962
+
963
+ return BaseModelOutputWithPooling(
964
+ last_hidden_state=sequence_output,
965
+ pooler_output=pooled_output,
966
+ hidden_states=encoder_outputs.hidden_states,
967
+ attentions=encoder_outputs.attentions,
968
+ )
969
+
970
+
971
+ class NewLMPredictionHead(nn.Module):
972
+ def __init__(self, config):
973
+ super().__init__()
974
+ self.dense = nn.Linear(config.hidden_size, config.hidden_size)
975
+ self.transform_act_fn = ACT2FN[config.hidden_act]
976
+ self.norm = nn.LayerNorm(config.hidden_size, eps=config.layer_norm_eps)
977
+
978
+ # The output weights are the same as the input embeddings, but there is
979
+ # an output-only bias for each token.
980
+ self.decoder = nn.Linear(config.hidden_size, config.vocab_size)
981
+
982
+ def forward(self, hidden_states):
983
+ hidden_states = self.dense(hidden_states)
984
+ hidden_states = self.transform_act_fn(hidden_states)
985
+ hidden_states = self.norm(hidden_states)
986
+ hidden_states = self.decoder(hidden_states)
987
+ return hidden_states
988
+
989
+
990
+ class NewForMaskedLM(NewPreTrainedModel):
991
+ _tied_weights_keys = ["lm_head.decoder.bias", "lm_head.decoder.weight"]
992
+
993
+ def __init__(self, config: NewConfig):
994
+ super().__init__(config)
995
+ self.new = NewModel(config, add_pooling_layer=False)
996
+ self.lm_head = NewLMPredictionHead(config)
997
+ self.loss_fct = nn.CrossEntropyLoss()
998
+
999
+ # Initialize weights and apply final processing
1000
+ self.post_init()
1001
+
1002
+ def get_output_embeddings(self):
1003
+ return self.lm_head.decoder
1004
+
1005
+ def set_output_embeddings(self, new_embeddings):
1006
+ self.lm_head.decoder = new_embeddings
1007
+
1008
+ def forward(
1009
+ self,
1010
+ input_ids: Optional[torch.Tensor] = None,
1011
+ attention_mask: Optional[torch.Tensor] = None,
1012
+ token_type_ids: Optional[torch.Tensor] = None,
1013
+ position_ids: Optional[torch.Tensor] = None,
1014
+ head_mask: Optional[torch.Tensor] = None,
1015
+ inputs_embeds: Optional[torch.Tensor] = None,
1016
+ labels: Optional[torch.Tensor] = None,
1017
+ output_attentions: Optional[bool] = None,
1018
+ output_hidden_states: Optional[bool] = None,
1019
+ return_dict: Optional[bool] = None,
1020
+ unpad_inputs: Optional[bool] = None,
1021
+ ) -> Union[Tuple[torch.Tensor], MaskedLMOutput]:
1022
+ r"""
1023
+ labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
1024
+ Labels for computing the masked language modeling loss. Indices should be in `[-100, 0, ...,
1025
+ config.vocab_size]` (see `input_ids` docstring) Tokens with indices set to `-100` are ignored (masked), the
1026
+ loss is only computed for the tokens with labels in `[0, ..., config.vocab_size]`
1027
+ """
1028
+
1029
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
1030
+
1031
+ if labels is None or not self.new.config.unpad_inputs:
1032
+ length = None
1033
+ subset_indices = None
1034
+ else:
1035
+ length = attention_mask.sum(-1).tolist()
1036
+ labels = labels[attention_mask.bool()].unsqueeze(0)
1037
+ subset_indices = labels > -100
1038
+
1039
+ outputs = self.new(
1040
+ input_ids,
1041
+ attention_mask=attention_mask,
1042
+ length=length,
1043
+ subset_indices=subset_indices,
1044
+ token_type_ids=token_type_ids,
1045
+ position_ids=position_ids,
1046
+ head_mask=head_mask,
1047
+ inputs_embeds=inputs_embeds,
1048
+ output_attentions=output_attentions,
1049
+ output_hidden_states=output_hidden_states,
1050
+ return_dict=return_dict,
1051
+ unpad_inputs=unpad_inputs,
1052
+ )
1053
+
1054
+ sequence_output = outputs[0]
1055
+ prediction_scores = self.lm_head(sequence_output)
1056
+
1057
+ masked_lm_loss = None
1058
+ if labels is not None:
1059
+ if subset_indices is None:
1060
+ mask = attention_mask.bool()
1061
+ prediction_scores = prediction_scores[mask]
1062
+ labels = labels[mask]
1063
+ else:
1064
+ labels = labels[subset_indices]
1065
+ masked_lm_loss = self.loss_fct(prediction_scores, labels)
1066
+
1067
+ if not return_dict:
1068
+ output = (prediction_scores,) + outputs[2:]
1069
+ return ((masked_lm_loss,) + output) if masked_lm_loss is not None else output
1070
+
1071
+ return MaskedLMOutput(
1072
+ loss=masked_lm_loss,
1073
+ logits=prediction_scores,
1074
+ hidden_states=outputs.hidden_states,
1075
+ attentions=outputs.attentions,
1076
+ )
1077
+
1078
+
1079
+ class NewForSequenceClassification(NewPreTrainedModel):
1080
+ def __init__(self, config):
1081
+ super().__init__(config)
1082
+ self.num_labels = config.num_labels
1083
+ self.config = config
1084
+
1085
+ self.new = NewModel(config, add_pooling_layer=True)
1086
+ classifier_dropout = (
1087
+ config.classifier_dropout if config.classifier_dropout is not None else config.hidden_dropout_prob
1088
+ )
1089
+ self.dropout = nn.Dropout(classifier_dropout)
1090
+ self.classifier = nn.Linear(config.hidden_size, config.num_labels)
1091
+
1092
+ # Initialize weights and apply final processing
1093
+ self.post_init()
1094
+
1095
+ def forward(
1096
+ self,
1097
+ input_ids: Optional[torch.Tensor] = None,
1098
+ attention_mask: Optional[torch.Tensor] = None,
1099
+ token_type_ids: Optional[torch.Tensor] = None,
1100
+ position_ids: Optional[torch.Tensor] = None,
1101
+ head_mask: Optional[torch.Tensor] = None,
1102
+ inputs_embeds: Optional[torch.Tensor] = None,
1103
+ labels: Optional[torch.Tensor] = None,
1104
+ output_attentions: Optional[bool] = None,
1105
+ output_hidden_states: Optional[bool] = None,
1106
+ return_dict: Optional[bool] = None,
1107
+ unpad_inputs: Optional[bool] = None,
1108
+ ) -> Union[Tuple[torch.Tensor], SequenceClassifierOutput]:
1109
+ r"""
1110
+ labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
1111
+ Labels for computing the sequence classification/regression loss. Indices should be in `[0, ...,
1112
+ config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If
1113
+ `config.num_labels > 1` a classification loss is computed (Cross-Entropy).
1114
+ """
1115
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
1116
+
1117
+ outputs = self.new(
1118
+ input_ids,
1119
+ attention_mask=attention_mask,
1120
+ token_type_ids=token_type_ids,
1121
+ position_ids=position_ids,
1122
+ head_mask=head_mask,
1123
+ inputs_embeds=inputs_embeds,
1124
+ output_attentions=output_attentions,
1125
+ output_hidden_states=output_hidden_states,
1126
+ return_dict=return_dict,
1127
+ unpad_inputs=unpad_inputs,
1128
+ )
1129
+
1130
+ pooled_output = outputs[1]
1131
+
1132
+ pooled_output = self.dropout(pooled_output)
1133
+ logits = self.classifier(pooled_output)
1134
+
1135
+ loss = None
1136
+ if labels is not None:
1137
+ if self.config.problem_type is None:
1138
+ if self.num_labels == 1:
1139
+ self.config.problem_type = "regression"
1140
+ elif self.num_labels > 1 and (labels.dtype == torch.long or labels.dtype == torch.int):
1141
+ self.config.problem_type = "single_label_classification"
1142
+ else:
1143
+ self.config.problem_type = "multi_label_classification"
1144
+
1145
+ if self.config.problem_type == "regression":
1146
+ loss_fct = nn.MSELoss()
1147
+ if self.num_labels == 1:
1148
+ loss = loss_fct(logits.squeeze(), labels.squeeze())
1149
+ else:
1150
+ loss = loss_fct(logits, labels)
1151
+ elif self.config.problem_type == "single_label_classification":
1152
+ loss_fct = nn.CrossEntropyLoss()
1153
+ loss = loss_fct(logits.view(-1, self.num_labels), labels.view(-1))
1154
+ elif self.config.problem_type == "multi_label_classification":
1155
+ loss_fct = nn.BCEWithLogitsLoss()
1156
+ loss = loss_fct(logits, labels)
1157
+
1158
+ if not return_dict:
1159
+ output = (logits,) + outputs[2:]
1160
+ return ((loss,) + output) if loss is not None else output
1161
+
1162
+ return SequenceClassifierOutput(
1163
+ loss=loss,
1164
+ logits=logits,
1165
+ hidden_states=outputs.hidden_states,
1166
+ attentions=outputs.attentions,
1167
+ )
1168
+
1169
+
1170
+ class NewForMultipleChoice(NewPreTrainedModel):
1171
+ def __init__(self, config):
1172
+ super().__init__(config)
1173
+
1174
+ self.new = NewModel(config, add_pooling_layer=True)
1175
+ classifier_dropout = (
1176
+ config.classifier_dropout if config.classifier_dropout is not None else config.hidden_dropout_prob
1177
+ )
1178
+ self.dropout = nn.Dropout(classifier_dropout)
1179
+ self.classifier = nn.Linear(config.hidden_size, 1)
1180
+
1181
+ # Initialize weights and apply final processing
1182
+ self.post_init()
1183
+
1184
+ def forward(
1185
+ self,
1186
+ input_ids: Optional[torch.Tensor] = None,
1187
+ attention_mask: Optional[torch.Tensor] = None,
1188
+ token_type_ids: Optional[torch.Tensor] = None,
1189
+ position_ids: Optional[torch.Tensor] = None,
1190
+ head_mask: Optional[torch.Tensor] = None,
1191
+ inputs_embeds: Optional[torch.Tensor] = None,
1192
+ labels: Optional[torch.Tensor] = None,
1193
+ output_attentions: Optional[bool] = None,
1194
+ output_hidden_states: Optional[bool] = None,
1195
+ return_dict: Optional[bool] = None,
1196
+ unpad_inputs: Optional[bool] = None,
1197
+ ) -> Union[Tuple[torch.Tensor], MultipleChoiceModelOutput]:
1198
+ r"""
1199
+ labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
1200
+ Labels for computing the multiple choice classification loss. Indices should be in `[0, ...,
1201
+ num_choices-1]` where `num_choices` is the size of the second dimension of the input tensors. (See
1202
+ `input_ids` above)
1203
+ """
1204
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
1205
+ num_choices = input_ids.shape[1] if input_ids is not None else inputs_embeds.shape[1]
1206
+
1207
+ input_ids = input_ids.view(-1, input_ids.size(-1)) if input_ids is not None else None
1208
+ attention_mask = attention_mask.view(-1, attention_mask.size(-1)) if attention_mask is not None else None
1209
+ token_type_ids = token_type_ids.view(-1, token_type_ids.size(-1)) if token_type_ids is not None else None
1210
+ position_ids = position_ids.view(-1, position_ids.size(-1)) if position_ids is not None else None
1211
+ inputs_embeds = (
1212
+ inputs_embeds.view(-1, inputs_embeds.size(-2), inputs_embeds.size(-1))
1213
+ if inputs_embeds is not None
1214
+ else None
1215
+ )
1216
+
1217
+ outputs = self.new(
1218
+ input_ids,
1219
+ attention_mask=attention_mask,
1220
+ token_type_ids=token_type_ids,
1221
+ position_ids=position_ids,
1222
+ head_mask=head_mask,
1223
+ inputs_embeds=inputs_embeds,
1224
+ output_attentions=output_attentions,
1225
+ output_hidden_states=output_hidden_states,
1226
+ return_dict=return_dict,
1227
+ unpad_inputs=unpad_inputs,
1228
+ )
1229
+
1230
+ pooled_output = outputs[1]
1231
+
1232
+ pooled_output = self.dropout(pooled_output)
1233
+ logits = self.classifier(pooled_output)
1234
+ reshaped_logits = logits.view(-1, num_choices)
1235
+
1236
+ loss = None
1237
+ if labels is not None:
1238
+ loss_fct = nn.CrossEntropyLoss()
1239
+ loss = loss_fct(reshaped_logits, labels)
1240
+
1241
+ if not return_dict:
1242
+ output = (reshaped_logits,) + outputs[2:]
1243
+ return ((loss,) + output) if loss is not None else output
1244
+
1245
+ return MultipleChoiceModelOutput(
1246
+ loss=loss,
1247
+ logits=reshaped_logits,
1248
+ hidden_states=outputs.hidden_states,
1249
+ attentions=outputs.attentions,
1250
+ )
1251
+
1252
+
1253
+ @dataclass
1254
+ class NewTokenClassifierOutput(ModelOutput):
1255
+ loss: Optional[torch.FloatTensor] = None
1256
+ logits: torch.FloatTensor = None
1257
+ last_hidden_state: torch.FloatTensor = None
1258
+ hidden_states: Optional[Tuple[torch.FloatTensor, ...]] = None
1259
+ attentions: Optional[Tuple[torch.FloatTensor, ...]] = None
1260
+
1261
+
1262
+ class NewForTokenClassification(NewPreTrainedModel):
1263
+ def __init__(self, config):
1264
+ super().__init__(config)
1265
+ self.num_labels = config.num_labels
1266
+
1267
+ self.new = NewModel(config, add_pooling_layer=False)
1268
+ classifier_dropout = (
1269
+ config.classifier_dropout if config.classifier_dropout is not None else config.hidden_dropout_prob
1270
+ )
1271
+ self.dropout = nn.Dropout(classifier_dropout)
1272
+ self.classifier = nn.Linear(config.hidden_size, config.num_labels)
1273
+
1274
+ # Initialize weights and apply final processing
1275
+ self.post_init()
1276
+
1277
+ def forward(
1278
+ self,
1279
+ input_ids: Optional[torch.Tensor] = None,
1280
+ attention_mask: Optional[torch.Tensor] = None,
1281
+ token_type_ids: Optional[torch.Tensor] = None,
1282
+ position_ids: Optional[torch.Tensor] = None,
1283
+ head_mask: Optional[torch.Tensor] = None,
1284
+ inputs_embeds: Optional[torch.Tensor] = None,
1285
+ labels: Optional[torch.Tensor] = None,
1286
+ output_attentions: Optional[bool] = None,
1287
+ output_hidden_states: Optional[bool] = None,
1288
+ return_dict: Optional[bool] = None,
1289
+ unpad_inputs: Optional[bool] = None,
1290
+ ) -> Union[Tuple[torch.Tensor], NewTokenClassifierOutput]:
1291
+ r"""
1292
+ labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
1293
+ Labels for computing the token classification loss. Indices should be in `[0, ..., config.num_labels - 1]`.
1294
+ """
1295
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
1296
+
1297
+ outputs = self.new(
1298
+ input_ids,
1299
+ attention_mask=attention_mask,
1300
+ token_type_ids=token_type_ids,
1301
+ position_ids=position_ids,
1302
+ head_mask=head_mask,
1303
+ inputs_embeds=inputs_embeds,
1304
+ output_attentions=output_attentions,
1305
+ output_hidden_states=output_hidden_states,
1306
+ return_dict=return_dict,
1307
+ unpad_inputs=unpad_inputs,
1308
+ )
1309
+
1310
+ sequence_output = outputs[0]
1311
+
1312
+ sequence_output = self.dropout(sequence_output)
1313
+ logits = self.classifier(sequence_output)
1314
+
1315
+ loss = None
1316
+ if labels is not None:
1317
+ loss_fct = nn.CrossEntropyLoss()
1318
+ loss = loss_fct(logits.view(-1, self.num_labels), labels.view(-1))
1319
+
1320
+ if not return_dict:
1321
+ output = (logits,) + outputs[2:]
1322
+ return ((loss,) + output) if loss is not None else output
1323
+
1324
+ return NewTokenClassifierOutput(
1325
+ loss=loss,
1326
+ logits=logits,
1327
+ last_hidden_state=sequence_output,
1328
+ hidden_states=outputs.hidden_states,
1329
+ attentions=outputs.attentions,
1330
+ )
1331
+
1332
+
1333
+ class NewForQuestionAnswering(NewPreTrainedModel):
1334
+ def __init__(self, config):
1335
+ super().__init__(config)
1336
+ self.num_labels = config.num_labels
1337
+
1338
+ self.new = NewModel(config, add_pooling_layer=False)
1339
+ self.qa_outputs = nn.Linear(config.hidden_size, config.num_labels)
1340
+
1341
+ # Initialize weights and apply final processing
1342
+ self.post_init()
1343
+
1344
+ def forward(
1345
+ self,
1346
+ input_ids: Optional[torch.Tensor] = None,
1347
+ attention_mask: Optional[torch.Tensor] = None,
1348
+ token_type_ids: Optional[torch.Tensor] = None,
1349
+ position_ids: Optional[torch.Tensor] = None,
1350
+ head_mask: Optional[torch.Tensor] = None,
1351
+ inputs_embeds: Optional[torch.Tensor] = None,
1352
+ start_positions: Optional[torch.Tensor] = None,
1353
+ end_positions: Optional[torch.Tensor] = None,
1354
+ output_attentions: Optional[bool] = None,
1355
+ output_hidden_states: Optional[bool] = None,
1356
+ return_dict: Optional[bool] = None,
1357
+ unpad_inputs: Optional[bool] = None,
1358
+ ) -> Union[Tuple[torch.Tensor], QuestionAnsweringModelOutput]:
1359
+ r"""
1360
+ start_positions (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
1361
+ Labels for position (index) of the start of the labelled span for computing the token classification loss.
1362
+ Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence
1363
+ are not taken into account for computing the loss.
1364
+ end_positions (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
1365
+ Labels for position (index) of the end of the labelled span for computing the token classification loss.
1366
+ Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence
1367
+ are not taken into account for computing the loss.
1368
+ """
1369
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
1370
+
1371
+ outputs = self.new(
1372
+ input_ids,
1373
+ attention_mask=attention_mask,
1374
+ token_type_ids=token_type_ids,
1375
+ position_ids=position_ids,
1376
+ head_mask=head_mask,
1377
+ inputs_embeds=inputs_embeds,
1378
+ output_attentions=output_attentions,
1379
+ output_hidden_states=output_hidden_states,
1380
+ return_dict=return_dict,
1381
+ unpad_inputs=unpad_inputs,
1382
+ )
1383
+
1384
+ sequence_output = outputs[0]
1385
+
1386
+ logits = self.qa_outputs(sequence_output)
1387
+ start_logits, end_logits = logits.split(1, dim=-1)
1388
+ start_logits = start_logits.squeeze(-1).contiguous()
1389
+ end_logits = end_logits.squeeze(-1).contiguous()
1390
+
1391
+ total_loss = None
1392
+ if start_positions is not None and end_positions is not None:
1393
+ # If we are on multi-GPU, split add a dimension
1394
+ if len(start_positions.size()) > 1:
1395
+ start_positions = start_positions.squeeze(-1)
1396
+ if len(end_positions.size()) > 1:
1397
+ end_positions = end_positions.squeeze(-1)
1398
+ # sometimes the start/end positions are outside our model inputs, we ignore these terms
1399
+ ignored_index = start_logits.size(1)
1400
+ start_positions = start_positions.clamp(0, ignored_index)
1401
+ end_positions = end_positions.clamp(0, ignored_index)
1402
+
1403
+ loss_fct = nn.CrossEntropyLoss(ignore_index=ignored_index)
1404
+ start_loss = loss_fct(start_logits, start_positions)
1405
+ end_loss = loss_fct(end_logits, end_positions)
1406
+ total_loss = (start_loss + end_loss) / 2
1407
+
1408
+ if not return_dict:
1409
+ output = (start_logits, end_logits) + outputs[2:]
1410
+ return ((total_loss,) + output) if total_loss is not None else output
1411
+
1412
+ return QuestionAnsweringModelOutput(
1413
+ loss=total_loss,
1414
+ start_logits=start_logits,
1415
+ end_logits=end_logits,
1416
+ hidden_states=outputs.hidden_states,
1417
+ attentions=outputs.attentions,
1418
+ )
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:883b037111086fd4dfebbbc9b7cee11e1517b5e0c0514879478661440f137085
3
+ size 17082987
tokenizer_config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "250001": {
36
+ "content": "<mask>",
37
+ "lstrip": true,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "eos_token": "</s>",
48
+ "mask_token": "<mask>",
49
+ "max_length": 512,
50
+ "model_max_length": 512,
51
+ "pad_to_multiple_of": null,
52
+ "pad_token": "<pad>",
53
+ "pad_token_type_id": 0,
54
+ "padding_side": "right",
55
+ "sep_token": "</s>",
56
+ "stride": 0,
57
+ "tokenizer_class": "XLMRobertaTokenizer",
58
+ "truncation_side": "right",
59
+ "truncation_strategy": "longest_first",
60
+ "unk_token": "<unk>"
61
+ }