Add new SentenceTransformer model
Browse files- .gitattributes +1 -0
- 1_Pooling/config.json +10 -0
- README.md +1501 -0
- config.json +50 -0
- config_sentence_transformers.json +10 -0
- configuration.py +145 -0
- model.safetensors +3 -0
- modeling.py +1418 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +3 -0
- tokenizer_config.json +61 -0
.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,1501 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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: G드라이브는 코로나19 때문에 재택근무가 확대되자 어떻게 활용되었어
|
12 |
+
sentences:
|
13 |
+
- 디지털 시대로의 전환은 정부의 일하는 방식에 변화를 가져왔다. 코로나 19의 확산과 함께 재택근무의 실시로 정부원격근무서비스(GVPN), G드라이브가
|
14 |
+
원격 근무 인프라 및 온라인 협업툴로 활용되었다. GVPN은 공무원이 인터넷이 연결된 곳이라면 국내‧외 출장지나 집에서 사무실처럼 업무를 처리할
|
15 |
+
수 있게 해주는 시스템이다. G드라이브는 정부 클라우드 서비스로 2017년 체계적 지식관리 및 행정 업무의 연속성을 확보하기 위해 서비스를
|
16 |
+
시작하였다. 업무용 컴퓨터 대신 클라우드에 업무계획, 통계, 정책보고서, 업무편람 등 공무원의 업무 및 정책 자료를 저장·관리하게 되었다.
|
17 |
+
공무원은 일하는 방식에 있어 GVPN, G드라이브 활용과 스마트워크센터와 같은 스마트업무환경에 익숙해지고 있다. 그러나 대면문화에 익숙한 조직문화,
|
18 |
+
접근성이 떨어지는 스마트워크센터, 데이터 활용에 대한 공감대 미흡 등의 어려움이 남아있다. 코로나 장기화로 어쩔 수 없이 비대면 문화에 익숙해지고
|
19 |
+
있지만 비대면 환경에서도 업무에 집중할 수 있는 문화로의 전환, 데이터 기반 행정 활성화를 위한 내부 업무 정비 및 표준화 등이 뒷받침되어야
|
20 |
+
할 것이다.
|
21 |
+
- 신종 코로나바이러스 감염증(코로나19) 이후 부상한 긱 이노코미(임시직 경제)가 고용시장을 바꿔놓으면서 ‘긱 워커’를 겨냥한 신생기업(스타트업)들이
|
22 |
+
뜨고 있다. 긱 워커란 회사에 정규직으로 얽매이지 않고 일정 기간 계약을 맺고 일하는 초단기 노동자다. 프리랜서 디자이너나 개발자, 각종 배달원,
|
23 |
+
번역가나 컨설턴트 등이 여기 속한다. 22일 관련업계에 따르면 회사는 정규직 채용보다 비용을 아낄 수 있고, 구직자는 장소와 시간에 구애 받지
|
24 |
+
않고 자유롭게 일하며 동시에 여러 계약으로 수익을 올릴 수 있어서 긱 워커를 선호한다. 특히 긱 워커로 일하는 20,30대 MZ세대(밀레니얼+Z세대)들이
|
25 |
+
늘면서 이들을 겨냥해 사업을 펼치는 스타트업들도 매출이 증가하거나 대규모 투자를 받고 있다. 대표적인 경우가 긱 워커와 기업을 연결해 주는
|
26 |
+
중개 스타트업들이다. 전세계에서 이용자가 가장 많은 미국의 업워크는 3,500가지 분야의 긱 워커 1,200만 명이 이용하고 있다. 이스라엘
|
27 |
+
스타트업 파이버도 디자이너와 개발자 등 400여 직종의 긱 워커들이 이용하면서 지난해 매출이 전년보다 약 78% 성장했다. 2012년 설립된
|
28 |
+
크몽은 국내에서 가장 큰 긱 워커 중개 스타트업이다. 이 업체에 따르면 디자인, 개발자, 영상, 마케팅 등 400여 분야에서 총 25만 명의
|
29 |
+
긱 워커들이 이용해 거래액이 4년 간 10배 이상 급증했다. 특히 이 곳을 통해 계약을 맺은 개발자, 디자이너, 영상 및 음악 전문가의 상위
|
30 |
+
10%는 연 평균 수입이 8,500만~3억4,400만 원에 이른다. 덕분에 크몽은 높은 성장성을 인정 받아 지난 4월 312억 원의 투자를
|
31 |
+
받았다. 스타트업 브레이브모바일도 이사, 청소, 실내장식, 반려동물 훈련, 과외, 심리상담 등 1,000여 가지 분야의 긱 워커를 연결해 주는
|
32 |
+
중개 서비스 ‘숨고’로 지난 14일 320억 원의 투자를 받았다. 이 업체에 따르면 코로나19 이후 각종 가정용 서비스에 대한 수요가 크게
|
33 |
+
늘어 지난해 매출이 전년 대비 160% 이상 성장했다. 숨고의 가입자는 약 500만 명이며 누적으로 3,000만 회 이상 긱 워커들에게 일을
|
34 |
+
제공했다. 채용 플랫폼을 운영하는 원티드는 긱 워커들에게 인공지능(AI)을 이용해 적합한 일자리를 소개하는 ‘원티드 긱스’ 서비스를 아예 따로
|
35 |
+
개발했다. 또 일자리 매니저인 매칭 매니저를 도입해 이들이 해당 일자리에 어울리는 긱 워커를 찾아내 계약부터 업무 진행, 정산까지 모든 과정을
|
36 |
+
1 대 1로 조율한다. 원티드 관계자는 “원티드 긱스 덕분에 등록된 긱 워커가 1년 만에 36배 증가했고 기업들의 채용 의뢰도 10배 늘었다”고
|
37 |
+
말했다. 긱 워커 증가에 맞춰 이들을 위한 스타트업 서비스도 늘고 있다. 금융기술 스타트업 엠마우스는 하나은행, 애큐온저축은행과 함께 긱 워커들에게
|
38 |
+
월급을 가불해 주는 ‘페이워치’ 앱을 선보였��. 긱 워커가 위성위치확인시스템(GPS)을 이용해 이 앱으로 출퇴근을 기록하면 일한 날짜만큼 금액을
|
39 |
+
미리 빌려 쓸 수 있다. 이후 월급을 받을 때 가불액을 제외한 나머지가 입금된다. 세무회계 스타트업 자비스앤빌런즈는 긱 워커를 위한 세무 서비스
|
40 |
+
‘삼쩜삼’을 운영한다. 세금 환급액을 확인하고 수수료 3.3%를 내면 간편하게 세무신고도 할 수 있는 서비스다. 이런 서비스 덕분에 이 업체는
|
41 |
+
올들어 65억 원을 투자받았다. 관련업계에서는 긱 이코노미 시장이 커지며 긱 워커를 겨냥한 스타트업과 서비스는 계속 늘어날 것으로 보고 있다.
|
42 |
+
이복기 원티드랩 대표는 “2025년까지 긱 이코노미의 부가가치가 2,948조 원에 이를 것이라는 외국 컨설팅 업체의 분석이 있다”며 “긱 워커
|
43 |
+
시장도 계속 커지면서 이들을 겨냥한 서비스 시장도 함께 증가할 것”이라고 전망했다.
|
44 |
+
- 33살에 임원 38살에 최고경영자 국내 재벌그룹에서 경영권 승계가 진행 중이거나 최근에 끝난 재벌총수 3~4세들이 처음 임원이 되는 나이는
|
45 |
+
평균 33살, 사장이나 회장 등 최고경영자의 지위에 오르는 나이는 평균 38살로 조사됐다. 또 이들 재벌 3~4세들이 입사해 최고경영자가 되는
|
46 |
+
데 걸리는 기간은 평균 11년 정도인 것으로 나타났다. 최근 일부 그룹 총수 일가의 초고속 승진이 사회적으로 주목을 받고 있는 가운데, 에서
|
47 |
+
경영승계가 진행되고 있거나 최근에 끝난 삼성, 엘지, 현대·기아차, 에스케이, 한진, 롯데, 두산, 신세계, 씨제이, 효성, 코오롱, 현대백화점
|
48 |
+
등 12개 주요 그룹의 재벌총수 3~4세(한진·롯데는 2세) 36명을 대상으로 경영승계 실태를 조사했더니 이렇게 나타났다. 조상 대상은 삼성에선
|
49 |
+
이재용 삼성전자 상무 등 5명, 엘지는 구본걸 엘지상사 부사장 등 3명, 현대·기아차는 정의선 기아차 사장 등 4명, 에스케이는 최태원 에스케이㈜
|
50 |
+
회장 등 4명, 한진은 조양호 회장 등 4명, 롯데는 신동빈 부회장, 두산은 박정원 ㈜두산 사장 등 5명, 신세계는 정용진 부사장 등 2명,
|
51 |
+
씨제이는 이재현 회장 등 2명, 효성은 조현준 부사장 등 3명, 코오롱은 이웅렬 회장, 현대백화점은 정지선 부회장 등 2명이다. 12개 그룹
|
52 |
+
총수 3~4세 36명 조사 입사 11년만에 최고경영자 ‥ “능력검증 필요” 조사 결과, 재벌 3~4세들은 평균 27.3살에 계열사에 입사한
|
53 |
+
뒤, 32.8살에 처음 임원에 임명됐다. 임원이 되는 데 걸린 기간은 평균 5.5년이었다. 재벌 3~4세 중에서 이미 사장 이상 직급(회장,
|
54 |
+
부회장 포함)을 맡고 있거나, 직급은 이에 못미치지만 대표이사를 맡아 사실상 최고경영자 노릇을 하고 있는 17명이 최고경영자에 오른 나이는
|
55 |
+
평균 38.2살이었다. 최고경영자 지위까지 오르는 데 걸린 기간은 입사 시점을 기준으로 하면 10.8년, 첫 임원 임명을 기준으로 하면 6.4년이었다.
|
56 |
+
또 삼성 이건희 회장과 엘지 구본무 회장, 현대·기아차의 정몽구 회장, 한화의 김승연 회장, 금호아시아나의 박삼구 회장, 두산의 박용오·용성
|
57 |
+
회장, 효성의 조석래 회장 등 주요 그룹의 현직 재벌총수 8명은 평균 28.2살에 계열사에 들어온 뒤, 30.2살에 임원으로 승진하고, 37.5살에
|
58 |
+
최고경영자에 선임된 것으로 나타났다. 재벌 3~4세들과 현직 재벌총수들을 비교하면, 임원 승진 나이는 2년 정도 늦어졌으나, 최고경영자로 선임되는
|
59 |
+
나이는 비슷하다. 정광선 한국기업지배구조 개선지원센터 원장(중앙대 교수)은 “재벌총수 일가의 초고속 승진과 조급한 경영승계는 기업을 위험에
|
60 |
+
빠뜨릴 수 있는 만큼 충분한 경영수업과 경영능력에 대한 객관적 검증이 필요하다”고 말했다. 곽정수 대기업전문기자
|
61 |
+
- source_sentence: 사천시가 진행하는 신년 맞이 행사에 참여하려면 어떤 동영상을 봐야 해
|
62 |
+
sentences:
|
63 |
+
- 'Ⅱ. 미 연준의 비전통적 통화정책 수행원칙
|
64 |
+
|
65 |
+
이 절에서 우리는 먼저 미국 중앙은행의 제도와 정책이 어떤 특성을 가지고 있는지를 살펴보되, 이후 검토할 비전통적인 통화원칙 논의와 관련이
|
66 |
+
깊은 내용을 중심으로 알아본다. 그리고 금융위기의 과정에서 미 연준이 어떻게 대응하였는지를 알아보고, 마지막으로 이러한 대응과정에서의 원칙이
|
67 |
+
무엇이었는지를 고찰해 본다. 1. 미국 중앙은행 제도와 통화정책의 특성
|
68 |
+
|
69 |
+
미국에서 중앙은행의 역할을 하고 있는 연방준비제도(Federal Reserve System, 이하 연준제도 또는 연준)의 가장 큰 특징은 반관반민(半官半民)의
|
70 |
+
성격이 있다는 점이다. 이 제도를 이루고 있는 세 주체는 연방준비제도이사회, 지역연준, 그리고 연방공개시장위원회이다. 미국의 수도인 워싱턴에
|
71 |
+
위치한 연방준비제도이사회(Federal Reserve Board, 정식명칭은 the Board of Governors of the Federal
|
72 |
+
Reserve System, 이하 연준이사회)는 공공부문의 성격을 띠고 있으나, 20세기 초반의 경제상황을 반영하여 미국 전역에 분포되어 있는
|
73 |
+
12개의 연방준비은행(Federal Reserve Banks, 이하 지역연준)은 법적으로는 완전히 사적인 조직이다. 비록 공공부문이기는 하나
|
74 |
+
연준이사회의 독립성은 14년이라는 이사의 임기와 예산의 독립성으로 보장되어 있으며, 국민에 대한 책임을 진다는 원칙에 따라 연준이사회는 의회에
|
75 |
+
설명할 법적 의무를 진다. 이러한 독립성은 흔히 정부 내에서의 독립(independence within the government)이라고 불리고
|
76 |
+
있다. 전통적인 통화금융정책에서 가장 중요한 수단인 연방기금금리(federal funds rate)를 결정하는 연방공개시장위원회(Federal
|
77 |
+
Open Market Committee, 약어로 FOMC)는 12명으로 구성되어 있다. 연준이사회를 구성하는 7명의 연준이사는 항상 구성원으로
|
78 |
+
포함되며, 12명의 지역연준 총재들 중에서 5명이 투표자로 참가함으로써 총 12명이 투표권을 행사한다. 뉴욕 연준의 총재는 연방공개시장위원회의
|
79 |
+
부의장 자격으로 상시 투표에 참여하고 있으며, 다른 지역연준의 총재들은 2년(시카고 및 클리블랜드 연준) 혹은 3년(나머지 9개 지역연준)마다
|
80 |
+
돌아가며 투표권을 나누어 갖고 있다.'
|
81 |
+
- 경남 사천시가 신축년 새해를 맞아 18일부터 23일까지 공식 유튜브 채널인 「사천TV」 를 통해 댓글 이벤트를 실시한다고 17일 밝혔다. 이번
|
82 |
+
이벤트는 사천바다케이블카, 무지개빛 해안도로 등 다른 관광명소에 비해 덜 알려진 아름다운 사천의 섬을 홍보하려는 취지다. 또 코로나19로 인해
|
83 |
+
사회적 거리두기 등으로 지친 전국 구독자에게 랜선여행을 제공, 여행 갈증을 해소하려고 기획됐다. 이벤트 기간 중 사천시 공식 유튜브 채널 「사천TV」에
|
84 |
+
접속해 ‘사천의 섬’ 영상을 시청한 뒤 영상 속에 등장하는 4개의 섬 이름과 당첨 때 상품권 수령을 위한 이메일을 댓글로 남기면 참여가 완료된다.
|
85 |
+
당첨자는 오는 25일에 발표된다. 참여자 100명을 추첨해 1만원 상당의 모바일 상품권을 준다. 구독하기, 좋아요, 알림 설정을 하면 당첨확률은
|
86 |
+
더 높아진다도 사천시 관계자는 조언했다.
|
87 |
+
- 경상남도, 연말연시·겨울방학 가볼만한 곳 35곳 추천<br>기해년·경자년 해넘이·해맞이 행사 <table><tbody><tr><td>시군</td><td>행사명</td><td>일시</td><td>장소</td><td>내용</td><td>연락처</td></tr><tr><td>창원</td><td>2019년
|
88 |
+
갈무리 및 2020년 새해맞이 타종식</td><td>12.31(화) 23:00~00:30 </td><td>창동 불종거리 </td><td>축하공연,
|
89 |
+
타종행사<br>신년인사 등 </td><td>225-3223 </td></tr><tr><td>창원</td><td>2019년 제야 타종식</td><td>12.31(화)
|
90 |
+
21:00~01:00 </td><td>창원대종각</td><td>식전공연, 타종식<br>신년인사, 합창 등 </td><td>225-3655</td></tr><tr><td>창원</td><td>2020
|
91 |
+
경술년 해맞이행사</td><td>1. 1(수) 06:00~ </td><td>마산합포구 만날공원</td><td>해맞이 방문객 어묵,막걸리 제공
|
92 |
+
등</td><td>220-5443</td></tr><tr><td>창원</td><td>2019년 제야의 종 타종행사</td><td>12.31(화)
|
93 |
+
23:00~00:30</td><td>진해구청 내 종각 앞</td><td>식전공연, 타종식 <br>신년인사, 먹거리부스운영 </td><td>548-4023</td></tr><tr><td>진주</td><td>2019년
|
94 |
+
제야의 종 타종행사</td><td>12.31(화) 22:50~00:50</td><td>진주성 호국 종각</td><td>타종식, 신년메시지<br>축하공연,
|
95 |
+
시민타종 체험<br>떡국 나눔 행사 </td><td>749-6942</td></tr><tr><td>통영</td><td>2020년 통영 해맞이
|
96 |
+
행사</td><td>1. 1(수) 06:00~08:00 </td><td>이순신 공원</td><td>희망찬 새해노래 <br>LED 전기초
|
97 |
+
소원 기원 </td><td>650-4032</td></tr><tr><td>사천</td><td>경자년 새해맞이 해돋이 행사</td><td>1.
|
98 |
+
1(수) 06:30~ </td><td>사천바다케이블카</td><td>순금 1돈 지급 이벤트<br>떡국 나눔 행사 </td><td>831-2780</td></tr><tr><td>김해</td><td>제야음악회
|
99 |
+
및 제야의 종 타종식</td><td>12.31(화) 22:00~00:30</td><td>김해시민의 종각</td><td>제야음악회, 타종식<br>푸드트럭
|
100 |
+
운영<br>소망풍선 날리기 </td><td>330-6844</td></tr><tr><td>거제</td><td>2019년 송년불꽃축제</td><td>12.31.(화)
|
101 |
+
13:00~20:00</td><td>장승포항</td><td>민속문화행사, 축하공연<br>멀티미디어 불꽃쇼 </td><td>639-3392</td></tr><tr><td>거제</td><td>2020년
|
102 |
+
신년 해맞이 축제</td><td>1. 1(수) 06:00~08:00 </td><td>장승포 몽돌개</td><td>민속문화행사, 떡국나눔 </td><td>639-6752</td></tr><tr><td>의령</td><td>2020년
|
103 |
+
부자 솥바위 해맞이 행사</td><td>1. 1(수) 07:00~09:00 </td><td>정암루</td><td>기원제례, 해맞이<br>떡국,
|
104 |
+
복주머니 나눔 </td><td>570-2505</td></tr><tr><td>창녕</td><td>2019년 제야의 종 타종식 행사</td><td>12.31(화)
|
105 |
+
22:30~00:15 </td><td>창녕대종각</td><td>음식나눔행사, 공연행사<br>타종식, 신년 메시지 </td><td>530-1464</td></tr><tr><td>고성</td><td>2020
|
106 |
+
동해면 해맞이 행사</td><td>1. 1(수) 06:30~08:30 </td><td>동해면 해맞이공원</td><td>기원제, 떡국 나눔
|
107 |
+
<br>농악공연, 소원문 풍선판매 </td><td>670-5604</td></tr><tr><td>남해</td><td>2020년 가천다랭이
|
108 |
+
해맞이 행사</td><td>1. 1(수) 06:00~09:00</td><td>가천 다랭이마을</td><td>새해 소망 기원제, 풍물놀이<br>떡국
|
109 |
+
제공(800명)<br>우렁이쌀 1kg 제공(200명) </td><td>860-8595</td></tr><tr><td>하동</td><td>2020년
|
110 |
+
하동 금오산 해맞이 행사</td><td>1. 1(수) 05:30~09:30 </td><td>금오산 정상</td><td>새해맞이 소원성취 기원제<br>떡국
|
111 |
+
및 다과 나눔 <br>짚와이어 무료탑승(40명) </td><td>880-6261</td></tr><tr><td>함양</td><td>2019년
|
112 |
+
제야의 종 타종식</td><td>12.31(화) 23:00~00:30</td><td>군민의 종 종각</td><td>식전행사, 타종행사<br>신년인사,
|
113 |
+
축하공연 </td><td>960-4361</td></tr><tr><td>함양</td><td>2020년 해맞이 행사</td><td>1. 1(수)
|
114 |
+
07:00~09:00 </td><td>백암산 정상</td><td>안녕기원제, 해맞이, <br>희망의 메시지, 떡국 나눔 </td><td>960-4361</td></tr><tr><td>거창</td><td>경자년
|
115 |
+
감악산 해맞이 축제</td><td>1. 1(수) 06:00~09:00 </td><td>감악산 정상</td><td>기원제, 소원풍선날리기<br>풍물놀이,
|
116 |
+
떡국 나눔 </td><td>940-7661</td></tr><tr><td>합천</td><td>합천 떡국나누기 해맞이 행사</td><td>1.
|
117 |
+
1(수) 06:00~09:00 </td><td>합천읍 마령재</td><td>떡국 나눔, 안녕 기원제</td><td>930-4667</td></tr><tr><td>합천</td><td>2019년
|
118 |
+
제야 군민대종 타종행사</td><td>12.31(화) 20:00~01:00 </td><td>대종각 일원 (일해공원)</td><td>식전행사,
|
119 |
+
타종행사</td><td>930-4667</td></tr></tbody></table>
|
120 |
+
- source_sentence: 산업부는 국내 중소·중견기업을 어떻게 글로벌 전문기업으로 육성시키려고 해
|
121 |
+
sentences:
|
122 |
+
- 또한 유치원의 방과후 과정 및 어린이집의 특별활동과 사교육 관련 질문을 혼동하는 경우가 있어, 두 질문을 구분할 수 있도록 질문배치와 지침의
|
123 |
+
위치 등을 수정하도록 제안하였다. ‘일반과목’, ‘논술’ 등의 표현이 적절하지 않다는 지적이 있어 구체적으로 표현할 것과, 사교육 이유 항목의
|
124 |
+
표현을 수정할 것을 제안했다. 사교육 시간 항목은 유아 사교육이 분 단위로 짧게 진행되는 경우가 많다는 점을 고려해, 시간 단위로만 응답하던
|
125 |
+
방식에서 시간과 분으로 응답하도록 제안했다. 그 밖에 사교육 과목과 유형, 인적사항 항목 등에 대한 표현 검토를 제안했으며, 가정 양육 조사표의
|
126 |
+
반일제 이상 학원 누락 오류를 줄이기 위해 지침의 배치 등을 조정하도록 했다. 3차 인지면접에서는 2차 인지면접 결과를 반영하여 수정된 조사표의
|
127 |
+
개선효과를 평가하는데 초점을 두었다. 3차 인지면접 결과, 조사표 구조 인식 개선효과는 확인되었지만 여전히 응답오류나 오류 가능성이 발견되었다.
|
128 |
+
따라서 응답오류 방지를 위해 조사표 첫 부분이나 조사 안내문에 전체 조사표 구조에 대한 설명을 제시할 필요가 있어 보인다. 또한 데스크톱이나
|
129 |
+
모바일조사표를 설계할 때, 전체 사교육 과목으로 선택한 과목을 해당 질문에 제시하면서 과목을 강조하여 제시할 필요가 있다.
|
130 |
+
- "글로벌 전문기업 400개 육성을 위한 2차 후보기업 모집 착수\n□ 산업통상자원부(장관 윤상직)는 수출 1억불 이상 글로벌 전문기업 400개\
|
131 |
+
\ 육성(2017년)을 위해 3.3(월)부터 2차 글로벌 전문 후보기업 모집에 들어간다고 밝힘\nㅇ 지난해 9월 산업부는 “글로벌 전문기업\
|
132 |
+
\ 육성 방안”을 발표(경제관계장관회의, 9.23)하고 1차 글로벌 전문 후보기업 46개사를 선정하여 기업의 글로벌화를 위한 다양한 시책을\
|
133 |
+
\ 지원 중에 있음\nㅇ 2차 글로벌 전문 후보기업은 최근 3년간 연간 수출 2천만불 이상 1억불 미만 실적이 있는 중소·중견기업 중에서 수출잠재력,\
|
134 |
+
\ 매출대비 수출비율, 수출확대계획 등을 종���적으로 고려하여 4월 중 선정될 예정\n□ 글로벌 전문 후보기업에 선정된 기업은 4대 플랫폼을\
|
135 |
+
\ 통해 기업 글로벌화를 위한 프리미엄 종합지원 프로그램을 제공받고, 산업부와 유관기관의 기존 시책도 우대*하여 지원받을 수 있음 * IP스타기업(특허청)\
|
136 |
+
\ 선정 평가시 후보기업에 5점 가점 부여, 표준기술력향상사업(국가기술표준원) 평가시 7점 가점 등 \n□ 관심 있는 기업은 4.1일까지 한국산업기술진흥원(KIAT)에\
|
137 |
+
\ 접수신청하면 되며 산업부와 진흥원은 후보기업 선정 평가를 거쳐 4월 중 최종 선정기업을 확정할 예정임 * 사업설명회 일정 : 3.12(수)\
|
138 |
+
\ 15:00 대한상공회의소 국제회의실"
|
139 |
+
- '산업부, 글로벌전문기술개발사업에 1,565억원 지원
|
140 |
+
|
141 |
+
□ 산업통상자원부(장관 윤상직)는 국내 중소․중견기업의 기술경쟁력 강화를 통해 글로벌전문기업으로 육성하기 위한 ‘2014년도 글로벌 전문기술개발사업(주력
|
142 |
+
및 신산업)‘의 신규 지원계획을 공고함
|
143 |
+
|
144 |
+
ㅇ 동 사업은 글로벌 기술경쟁력을 보유한 우수 중소·중견기업을육성하는 산업부의 대표 R&D사업으로, 지원 규모는 과제 특성에따라 최대 5년
|
145 |
+
이내에서 매년 2~10억원 규모임 □ 2014년 글로벌전문기술개발사업(주력 및 신산업) 지원 예산 1,565억원 중 금번 신규 지원 공고대상은
|
146 |
+
5개 내역사업, 413억원 규모임
|
147 |
+
|
148 |
+
ㅇ 섬유생활스트림, 해양레저장비, 개인용이동수단, 청정생산기반 등 4개 사업의 신규 예산은 223억원으로,
|
149 |
+
|
150 |
+
- 품목지정형 과제* 32개에 153.29억원을 지원하며,
|
151 |
+
|
152 |
+
* 품목 : 단위 기술이 아닌 ‘주요 성능을 포함한 제품 혹은 제품군’을 의미
|
153 |
+
|
154 |
+
- (예) 고기능성 친환경 벽지제품, 휴대용 접이식 전기자전거, 등
|
155 |
+
|
156 |
+
* 품목지정형 과제수 : 섬유생활스트림 25개, 해양레저장비 2개, 개인용 이동수단 2개, 청정생산기반 3개
|
157 |
+
|
158 |
+
- 자유공모형 과제는 섬유생활스트림, 해양레저장비, 청정생산기반 등 3개 사업에서 69.67억원을 지원함
|
159 |
+
|
160 |
+
ㅇ 우수기술연구센터(ATC) 사업은 자유공모형 과제를 지원하며, 우수 중소·중견기업 부설연구소 40개 내외를 선정하여 190억원을 지원함'
|
161 |
+
- source_sentence: 주꾸미어종의 낚시금지기간은 언제야
|
162 |
+
sentences:
|
163 |
+
- 7월 1일부터 낚시어선도 출항 전 비상대응요령 안내 의무화<br>낚시어선의 안전운항 등을 위한 안내(게시용) (예)<br>2. 주요 낚시어종의
|
164 |
+
포획금지 체장․체중 등 수산자원 보호 <table><tbody><tr><td>어종</td><td>금지기간</td><td>금지구역</td><td>금지체장․체중</td></tr><tr><td>주꾸미</td><td>5.11~8.31</td><td>전국</td><td>-</td></tr><tr><td>갈치</td><td>7.1~7.31<br>(근해채낚기어업과
|
165 |
+
연안복합어업 제외)</td><td>전국</td><td>18㎝이하(항문장)</td></tr><tr><td>문치가자미</td><td>12.1~1.31</td><td>전국</td><td>15㎝이하</td></tr><tr><td>넙치</td><td>-</td><td>-</td><td>21㎝이하</td></tr><tr><td>농어</td><td>-</td><td>-</td><td>30㎝이하</td></tr></tbody></table>
|
166 |
+
- '인천시 주꾸미 방류..“잘 커서 돌아올게요!” - 자체 생산 주꾸미 수산종자 50만여 마리를 인천 바다에 방류 -
|
167 |
+
|
168 |
+
인천광역시(시장 박남춘)는 수산자원연구소에서 자체 생산한 주꾸미 수산종자 50만여 마리를 7월 말까지 인천 앞바다에 방류한다고 밝혔다. 이번에
|
169 |
+
생산한 주꾸미 수산종자는 50일 동안 대량양식 기술을 통해 생산한 우량 수산종자이다. 방류해역은 사전에 조사된 인천 주꾸미 서식지 4곳으로
|
170 |
+
각각 ▲영흥해역(20만3천 마리), ▲강화군 동검도(10만 마리), ▲중구 영종(15만 마리), ▲옹진군 대이작도(5만 마리)이다. 어업인과
|
171 |
+
낚시인 모두에게 인기 있는 주꾸미는 급격한 생산량 감소로 산란기 금어기(5. 11.~8. 31.)와 시범방류 품종 지정 등 자원회복을 위한
|
172 |
+
정부 정책이 시행 중이다. * 주꾸미 금어기: 2018년부터 시행
|
173 |
+
|
174 |
+
** 해양수산부 수산종자 방류 지침: 2019년부터 시범방류 품종'
|
175 |
+
- 해양수산부는 어업이나 양식업에 종사하면서 어촌의 발전을 이끌어나갈 '수산업경영인'을 다음 달 28일까지 모집한다고 밝혔다. 수산업경영인은 어업
|
176 |
+
종사 경력에 따라 '어업인후계자'와 '우수경영인' 등 2단계로 나뉜다. 어업인후계자는 만 50세 미만이고 어업분야 종사 경력이 없거나 10년
|
177 |
+
미만인 사람 중에서 선정한다. 우수경영인은 만 60세 이하로 어업인후계자 선정 후 5년 이상 지난 사람 가운데에서 선발한다. 어업인후계자는
|
178 |
+
연간 금리 2%와 10년 상환의 조건으로 최대 3억 원까지, 우수경영인��� 연리 1%와 15년 상환 조건으로 최대 2억 원까지 융자 지원을 받을
|
179 |
+
수 있다. 신청은 각 지방자치단체에 하면 된다. 해수부는 어업인후계자 300명, 우수경영인 50명을 선발해 4월 중 해당 지자체에 공지할 예정이다.
|
180 |
+
- source_sentence: 안정적인 경제성장과 소비 증가 등 능력을 키우고 있으며 인구 6억 3000만 명의 거대 경제권으로 구성된 동남아시아
|
181 |
+
단체는 뭐지
|
182 |
+
sentences:
|
183 |
+
- 중국의 창지투개발계획 등 동북지역 개발전략은 동북아에서 실질적으로 개발협력의 기회를 제공한다는 점에서 중요한 의미를 가진다. 중국 동북지역은
|
184 |
+
인구가 1억명을 초과하고, 세계 20위권국가 규모에 해당하는 8,000억 달러의 GDP(2012년)와 높은 경제성장률을 보이고 있는 지역으로
|
185 |
+
최근 러시아 극동지역과 한반도 북부를 포함하는 동북아 지역개발의 실질적인 중심역할을 하고 있다. 북한은 두만강유역에서의 개발을 추진할 능력을
|
186 |
+
보유하지 못하고 있고, 러시아는 비록 동북아에서의 전략적 지위 확보에 관심이 있지만 실질적인 개발투자를 실행할 능력은 보유하고 있지 못하며,
|
187 |
+
남한도 동북아지역의 개발을 주도할 만한 전략과 자금력을 갖추고 있지 못하다는 점에서 중국 주도의 두만강유역 개발을 부정적으로만 평가할 수 없는
|
188 |
+
상황이라 할 수 있다. 따라서, 한국은 중국 및 러시아와 두만강유역에서의 적극적 협력을 통해 남, 북, 중, 러 네 나라의 공동이익을 최대화하면서
|
189 |
+
한반도경제와 대륙경제의 통합을 위한 장기포석을 마련할 필요가 있다.
|
190 |
+
- "자연‧문화 자원 조사현황\x03<br> 문화경관 자원 <table><tbody><tr><td colspan='2'>구분</td><td>명칭</td><td>지정번호</td><td>비고</td></tr><tr><td\
|
191 |
+
\ colspan='3'>합계</td><td>18점</td><td> </td></tr><tr><td rowspan='12'>국가 지정</td><td\
|
192 |
+
\ rowspan='10'>천연기념물(10)</td><td>봉화석포면 열목어서식지</td><td>제74호</td><td> </td></tr><tr><td>산양</td><td>제217호</td><td>\
|
193 |
+
\ </td></tr><tr><td>하늘다람쥐</td><td>제328호</td><td> </td></tr><tr><td>원앙</td><td>제327호</td><td>\
|
194 |
+
\ </td></tr><tr><td>매</td><td>제323-7호</td><td> </td></tr><tr><td>독수리</td><td>제243-1호</td><td>\
|
195 |
+
\ </td></tr><tr><td>붉은배새매</td><td>제323-2호</td><td> </td></tr><tr><td>검독수리</td><td>제243호</td><td>\
|
196 |
+
\ </td></tr><tr><td>두견이</td><td>제447호</td><td> </td></tr><tr><td>소쩍새</td><td>제324호</td><td>\
|
197 |
+
\ </td></tr><tr><td>명승(1)</td><td>태백 검룡소</td><td>제73호</td><td> </td></tr><tr><td>중요민속문화재(1)</td><td>태백산\
|
198 |
+
\ 천제단</td><td>제228호</td><td> </td></tr><tr><td>지방 지정</td><td>강원도 민속문화재(1)</td><td>태백산\
|
199 |
+
\ 석장승</td><td>제4호</td><td> </td></tr><tr><td>기타</td><td>민속자원(5)</td><td>검룡소(儉龍沼)기우제(祈雨祭),\
|
200 |
+
\ 두문동재, 불바래기, 창죽, 예터</td><td> </td><td> </td></tr></tbody></table> [주요 문화경관 자원\
|
201 |
+
\ 현황]"
|
202 |
+
- 2008년 금융위기 이후 세계경제의 전반적 침체는 수출주도 성장을 지속해온 우리나라 경제에 위기를 가져왔다. 우리 경제는 위기 극복을 위해
|
203 |
+
내수시장 활성화 등의 정책을 제시하고 있으나, 아직까지 뚜렷한 반전의 모멘텀을 찾지 못한 것으로 판단된다. 그러므로 대외의존도가 높은 우리나라의
|
204 |
+
경제구조하에서 위기 극복은 수출 및 무역의 확대를 통해 이루어져야 한다. 이러한 측면에서 볼 때 최근 ASEAN 경제 통합 강화 흐름은 활용
|
205 |
+
여하에 따라 우리가 처한 경제 위기를 극복할 수 있는 하나의 단초를 제공할 수 있다. 동남아시아 10개 국가로 구성된 아세안은 인구 6억 3,000만명의
|
206 |
+
거대 경제권으로 최근 안정적인 경제성장, 중산층 확대에 따른 소비증대, 젊은층의 비중이 높은 인구학적 장점 등은 시장 및 생산기반으로서의 잠재력을
|
207 |
+
점증시키고 있다.
|
208 |
+
pipeline_tag: sentence-similarity
|
209 |
+
library_name: sentence-transformers
|
210 |
+
---
|
211 |
+
|
212 |
+
# SentenceTransformer based on Alibaba-NLP/gte-multilingual-base
|
213 |
+
|
214 |
+
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.
|
215 |
+
|
216 |
+
## Model Details
|
217 |
+
|
218 |
+
### Model Description
|
219 |
+
- **Model Type:** Sentence Transformer
|
220 |
+
- **Base model:** [Alibaba-NLP/gte-multilingual-base](https://huggingface.co/Alibaba-NLP/gte-multilingual-base) <!-- at revision 7fc06782350c1a83f88b15dd4b38ef853d3b8503 -->
|
221 |
+
- **Maximum Sequence Length:** 512 tokens
|
222 |
+
- **Output Dimensionality:** 768 tokens
|
223 |
+
- **Similarity Function:** Cosine Similarity
|
224 |
+
<!-- - **Training Dataset:** Unknown -->
|
225 |
+
<!-- - **Language:** Unknown -->
|
226 |
+
<!-- - **License:** Unknown -->
|
227 |
+
|
228 |
+
### Model Sources
|
229 |
+
|
230 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
231 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
232 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
233 |
+
|
234 |
+
### Full Model Architecture
|
235 |
+
|
236 |
+
```
|
237 |
+
SentenceTransformer(
|
238 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: NewModel
|
239 |
+
(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})
|
240 |
+
(2): Normalize()
|
241 |
+
)
|
242 |
+
```
|
243 |
+
|
244 |
+
## Usage
|
245 |
+
|
246 |
+
### Direct Usage (Sentence Transformers)
|
247 |
+
|
248 |
+
First install the Sentence Transformers library:
|
249 |
+
|
250 |
+
```bash
|
251 |
+
pip install -U sentence-transformers
|
252 |
+
```
|
253 |
+
|
254 |
+
Then you can load this model and run inference.
|
255 |
+
```python
|
256 |
+
from sentence_transformers import SentenceTransformer
|
257 |
+
|
258 |
+
# Download from the 🤗 Hub
|
259 |
+
model = SentenceTransformer("seongil-dn/gte-neg-bs320-5e-5-1000")
|
260 |
+
# Run inference
|
261 |
+
sentences = [
|
262 |
+
'안정적인 경제성장과 소비 증가 등 능력을 키우고 있으며 인구 6억 3000만 명의 거대 경제권으로 구성된 동남아시아 단체는 뭐지',
|
263 |
+
'2008년 금융위기 이후 세계경제의 전반적 침체는 수출주도 성장을 지속해온 우리나라 경제에 위기를 가져왔다. 우리 경제는 위기 극복을 위해 내수시장 활성화 등의 정책을 제시하고 있으나, 아직까지 뚜렷한 반전의 모멘텀을 찾지 못한 것으로 판단된다. 그러므로 대외의존도가 높은 우리나라의 경제구조하에서 위기 극복은 수출 및 무역의 확대를 통해 이루어져야 한다. 이러한 측면에서 볼 때 최근 ASEAN 경제 통합 강화 흐름은 활용 여하에 따라 우리가 처한 경제 위기를 극복할 수 있는 하나의 단초를 제공할 수 있다. 동남아시아 10개 국가로 구성된 아세안은 인구 6억 3,000만명의 거대 경제권으로 최근 안정적인 경제성장, 중산층 확대에 따른 소비증대, 젊은층의 비중이 높은 인구학적 장점 등은 시장 및 생산기반으로서의 잠재력을 점증시키고 있다.',
|
264 |
+
'중국의 창지투개발계획 등 동북지역 개발전략은 동북아에서 실질적으로 개발협력의 기회를 제공한다는 점에서 중요한 의미를 가진다. 중국 동북지역은 인구가 1억명을 초과하고, 세계 20위권국가 규모에 해당하는 8,000억 달러의 GDP(2012년)와 높은 경제성장률을 보이고 있는 지역으로 최근 러시아 극동지역과 한반도 북부를 포함하는 동북아 지역개발의 실질적인 중심역할을 하고 있다. 북한은 두만강유역에서의 개발을 추진할 능력을 보유하지 못하고 있고, 러시아는 비록 동북아에서의 전략적 지위 확보에 관심이 있지만 실질적인 개발투자를 실행할 능력은 보유하고 있지 못하며, 남한도 동북아지역의 개발을 주도할 만한 전략과 자금력을 갖추고 있지 못하다는 점에서 중국 주도의 두만강유역 개발을 부정적으로만 평가할 수 없는 상황이라 할 수 있다. 따라서, 한국은 중국 및 러시아와 두만강유역에서의 적극적 협력을 통해 남, 북, 중, 러 네 나라의 공동이익을 최대화하면서 한반도경제와 대륙경제의 통합을 위한 장기포석을 마련할 필요가 있다.',
|
265 |
+
]
|
266 |
+
embeddings = model.encode(sentences)
|
267 |
+
print(embeddings.shape)
|
268 |
+
# [3, 768]
|
269 |
+
|
270 |
+
# Get the similarity scores for the embeddings
|
271 |
+
similarities = model.similarity(embeddings, embeddings)
|
272 |
+
print(similarities.shape)
|
273 |
+
# [3, 3]
|
274 |
+
```
|
275 |
+
|
276 |
+
<!--
|
277 |
+
### Direct Usage (Transformers)
|
278 |
+
|
279 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
280 |
+
|
281 |
+
</details>
|
282 |
+
-->
|
283 |
+
|
284 |
+
<!--
|
285 |
+
### Downstream Usage (Sentence Transformers)
|
286 |
+
|
287 |
+
You can finetune this model on your own dataset.
|
288 |
+
|
289 |
+
<details><summary>Click to expand</summary>
|
290 |
+
|
291 |
+
</details>
|
292 |
+
-->
|
293 |
+
|
294 |
+
<!--
|
295 |
+
### Out-of-Scope Use
|
296 |
+
|
297 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
298 |
+
-->
|
299 |
+
|
300 |
+
<!--
|
301 |
+
## Bias, Risks and Limitations
|
302 |
+
|
303 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
304 |
+
-->
|
305 |
+
|
306 |
+
<!--
|
307 |
+
### Recommendations
|
308 |
+
|
309 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
310 |
+
-->
|
311 |
+
|
312 |
+
## Training Details
|
313 |
+
|
314 |
+
### Training Hyperparameters
|
315 |
+
#### Non-Default Hyperparameters
|
316 |
+
|
317 |
+
- `per_device_train_batch_size`: 80
|
318 |
+
- `per_device_eval_batch_size`: 80
|
319 |
+
- `warmup_steps`: 100
|
320 |
+
- `bf16`: True
|
321 |
+
|
322 |
+
#### All Hyperparameters
|
323 |
+
<details><summary>Click to expand</summary>
|
324 |
+
|
325 |
+
- `overwrite_output_dir`: False
|
326 |
+
- `do_predict`: False
|
327 |
+
- `eval_strategy`: no
|
328 |
+
- `prediction_loss_only`: True
|
329 |
+
- `per_device_train_batch_size`: 80
|
330 |
+
- `per_device_eval_batch_size`: 80
|
331 |
+
- `per_gpu_train_batch_size`: None
|
332 |
+
- `per_gpu_eval_batch_size`: None
|
333 |
+
- `gradient_accumulation_steps`: 1
|
334 |
+
- `eval_accumulation_steps`: None
|
335 |
+
- `torch_empty_cache_steps`: None
|
336 |
+
- `learning_rate`: 5e-05
|
337 |
+
- `weight_decay`: 0.0
|
338 |
+
- `adam_beta1`: 0.9
|
339 |
+
- `adam_beta2`: 0.999
|
340 |
+
- `adam_epsilon`: 1e-08
|
341 |
+
- `max_grad_norm`: 1.0
|
342 |
+
- `num_train_epochs`: 3
|
343 |
+
- `max_steps`: -1
|
344 |
+
- `lr_scheduler_type`: linear
|
345 |
+
- `lr_scheduler_kwargs`: {}
|
346 |
+
- `warmup_ratio`: 0.0
|
347 |
+
- `warmup_steps`: 100
|
348 |
+
- `log_level`: passive
|
349 |
+
- `log_level_replica`: warning
|
350 |
+
- `log_on_each_node`: True
|
351 |
+
- `logging_nan_inf_filter`: True
|
352 |
+
- `save_safetensors`: True
|
353 |
+
- `save_on_each_node`: False
|
354 |
+
- `save_only_model`: False
|
355 |
+
- `restore_callback_states_from_checkpoint`: False
|
356 |
+
- `no_cuda`: False
|
357 |
+
- `use_cpu`: False
|
358 |
+
- `use_mps_device`: False
|
359 |
+
- `seed`: 42
|
360 |
+
- `data_seed`: None
|
361 |
+
- `jit_mode_eval`: False
|
362 |
+
- `use_ipex`: False
|
363 |
+
- `bf16`: True
|
364 |
+
- `fp16`: False
|
365 |
+
- `fp16_opt_level`: O1
|
366 |
+
- `half_precision_backend`: auto
|
367 |
+
- `bf16_full_eval`: False
|
368 |
+
- `fp16_full_eval`: False
|
369 |
+
- `tf32`: None
|
370 |
+
- `local_rank`: 0
|
371 |
+
- `ddp_backend`: None
|
372 |
+
- `tpu_num_cores`: None
|
373 |
+
- `tpu_metrics_debug`: False
|
374 |
+
- `debug`: []
|
375 |
+
- `dataloader_drop_last`: True
|
376 |
+
- `dataloader_num_workers`: 0
|
377 |
+
- `dataloader_prefetch_factor`: None
|
378 |
+
- `past_index`: -1
|
379 |
+
- `disable_tqdm`: False
|
380 |
+
- `remove_unused_columns`: True
|
381 |
+
- `label_names`: None
|
382 |
+
- `load_best_model_at_end`: False
|
383 |
+
- `ignore_data_skip`: False
|
384 |
+
- `fsdp`: []
|
385 |
+
- `fsdp_min_num_params`: 0
|
386 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
387 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
388 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
389 |
+
- `deepspeed`: None
|
390 |
+
- `label_smoothing_factor`: 0.0
|
391 |
+
- `optim`: adamw_torch
|
392 |
+
- `optim_args`: None
|
393 |
+
- `adafactor`: False
|
394 |
+
- `group_by_length`: False
|
395 |
+
- `length_column_name`: length
|
396 |
+
- `ddp_find_unused_parameters`: None
|
397 |
+
- `ddp_bucket_cap_mb`: None
|
398 |
+
- `ddp_broadcast_buffers`: False
|
399 |
+
- `dataloader_pin_memory`: True
|
400 |
+
- `dataloader_persistent_workers`: False
|
401 |
+
- `skip_memory_metrics`: True
|
402 |
+
- `use_legacy_prediction_loop`: False
|
403 |
+
- `push_to_hub`: False
|
404 |
+
- `resume_from_checkpoint`: None
|
405 |
+
- `hub_model_id`: None
|
406 |
+
- `hub_strategy`: every_save
|
407 |
+
- `hub_private_repo`: False
|
408 |
+
- `hub_always_push`: False
|
409 |
+
- `gradient_checkpointing`: False
|
410 |
+
- `gradient_checkpointing_kwargs`: None
|
411 |
+
- `include_inputs_for_metrics`: False
|
412 |
+
- `eval_do_concat_batches`: True
|
413 |
+
- `fp16_backend`: auto
|
414 |
+
- `push_to_hub_model_id`: None
|
415 |
+
- `push_to_hub_organization`: None
|
416 |
+
- `mp_parameters`:
|
417 |
+
- `auto_find_batch_size`: False
|
418 |
+
- `full_determinism`: False
|
419 |
+
- `torchdynamo`: None
|
420 |
+
- `ray_scope`: last
|
421 |
+
- `ddp_timeout`: 1800
|
422 |
+
- `torch_compile`: False
|
423 |
+
- `torch_compile_backend`: None
|
424 |
+
- `torch_compile_mode`: None
|
425 |
+
- `dispatch_batches`: None
|
426 |
+
- `split_batches`: None
|
427 |
+
- `include_tokens_per_second`: False
|
428 |
+
- `include_num_input_tokens_seen`: False
|
429 |
+
- `neftune_noise_alpha`: None
|
430 |
+
- `optim_target_modules`: None
|
431 |
+
- `batch_eval_metrics`: False
|
432 |
+
- `eval_on_start`: False
|
433 |
+
- `eval_use_gather_object`: False
|
434 |
+
- `batch_sampler`: batch_sampler
|
435 |
+
- `multi_dataset_batch_sampler`: proportional
|
436 |
+
|
437 |
+
</details>
|
438 |
+
|
439 |
+
### Training Logs
|
440 |
+
<details><summary>Click to expand</summary>
|
441 |
+
|
442 |
+
| Epoch | Step | Training Loss |
|
443 |
+
|:------:|:----:|:-------------:|
|
444 |
+
| 0.0007 | 1 | 0.6586 |
|
445 |
+
| 0.0013 | 2 | 0.6342 |
|
446 |
+
| 0.0020 | 3 | 0.6724 |
|
447 |
+
| 0.0027 | 4 | 0.697 |
|
448 |
+
| 0.0033 | 5 | 0.657 |
|
449 |
+
| 0.0040 | 6 | 0.5993 |
|
450 |
+
| 0.0046 | 7 | 0.68 |
|
451 |
+
| 0.0053 | 8 | 0.6296 |
|
452 |
+
| 0.0060 | 9 | 0.7052 |
|
453 |
+
| 0.0066 | 10 | 0.6982 |
|
454 |
+
| 0.0073 | 11 | 0.6726 |
|
455 |
+
| 0.0080 | 12 | 0.6552 |
|
456 |
+
| 0.0086 | 13 | 0.6707 |
|
457 |
+
| 0.0093 | 14 | 0.6253 |
|
458 |
+
| 0.0099 | 15 | 0.6869 |
|
459 |
+
| 0.0106 | 16 | 0.6612 |
|
460 |
+
| 0.0113 | 17 | 0.66 |
|
461 |
+
| 0.0119 | 18 | 0.6964 |
|
462 |
+
| 0.0126 | 19 | 0.6654 |
|
463 |
+
| 0.0133 | 20 | 0.669 |
|
464 |
+
| 0.0139 | 21 | 0.6045 |
|
465 |
+
| 0.0146 | 22 | 0.6441 |
|
466 |
+
| 0.0153 | 23 | 0.6053 |
|
467 |
+
| 0.0159 | 24 | 0.6318 |
|
468 |
+
| 0.0166 | 25 | 0.6073 |
|
469 |
+
| 0.0172 | 26 | 0.6288 |
|
470 |
+
| 0.0179 | 27 | 0.5385 |
|
471 |
+
| 0.0186 | 28 | 0.5787 |
|
472 |
+
| 0.0192 | 29 | 0.5824 |
|
473 |
+
| 0.0199 | 30 | 0.5535 |
|
474 |
+
| 0.0206 | 31 | 0.5498 |
|
475 |
+
| 0.0212 | 32 | 0.5915 |
|
476 |
+
| 0.0219 | 33 | 0.5458 |
|
477 |
+
| 0.0225 | 34 | 0.4879 |
|
478 |
+
| 0.0232 | 35 | 0.4858 |
|
479 |
+
| 0.0239 | 36 | 0.4651 |
|
480 |
+
| 0.0245 | 37 | 0.5266 |
|
481 |
+
| 0.0252 | 38 | 0.4629 |
|
482 |
+
| 0.0259 | 39 | 0.4618 |
|
483 |
+
| 0.0265 | 40 | 0.4657 |
|
484 |
+
| 0.0272 | 41 | 0.4514 |
|
485 |
+
| 0.0279 | 42 | 0.477 |
|
486 |
+
| 0.0285 | 43 | 0.395 |
|
487 |
+
| 0.0292 | 44 | 0.4078 |
|
488 |
+
| 0.0298 | 45 | 0.4812 |
|
489 |
+
| 0.0305 | 46 | 0.4056 |
|
490 |
+
| 0.0312 | 47 | 0.3871 |
|
491 |
+
| 0.0318 | 48 | 0.4371 |
|
492 |
+
| 0.0325 | 49 | 0.3622 |
|
493 |
+
| 0.0332 | 50 | 0.3433 |
|
494 |
+
| 0.0338 | 51 | 0.3659 |
|
495 |
+
| 0.0345 | 52 | 0.3752 |
|
496 |
+
| 0.0351 | 53 | 0.354 |
|
497 |
+
| 0.0358 | 54 | 0.3869 |
|
498 |
+
| 0.0365 | 55 | 0.3168 |
|
499 |
+
| 0.0371 | 56 | 0.3576 |
|
500 |
+
| 0.0378 | 57 | 0.3096 |
|
501 |
+
| 0.0385 | 58 | 0.3043 |
|
502 |
+
| 0.0391 | 59 | 0.3192 |
|
503 |
+
| 0.0398 | 60 | 0.2984 |
|
504 |
+
| 0.0405 | 61 | 0.3342 |
|
505 |
+
| 0.0411 | 62 | 0.3186 |
|
506 |
+
| 0.0418 | 63 | 0.2638 |
|
507 |
+
| 0.0424 | 64 | 0.2813 |
|
508 |
+
| 0.0431 | 65 | 0.323 |
|
509 |
+
| 0.0438 | 66 | 0.2617 |
|
510 |
+
| 0.0444 | 67 | 0.2497 |
|
511 |
+
| 0.0451 | 68 | 0.2694 |
|
512 |
+
| 0.0458 | 69 | 0.2684 |
|
513 |
+
| 0.0464 | 70 | 0.2875 |
|
514 |
+
| 0.0471 | 71 | 0.2759 |
|
515 |
+
| 0.0477 | 72 | 0.261 |
|
516 |
+
| 0.0484 | 73 | 0.2537 |
|
517 |
+
| 0.0491 | 74 | 0.2294 |
|
518 |
+
| 0.0497 | 75 | 0.2082 |
|
519 |
+
| 0.0504 | 76 | 0.2253 |
|
520 |
+
| 0.0511 | 77 | 0.2389 |
|
521 |
+
| 0.0517 | 78 | 0.2072 |
|
522 |
+
| 0.0524 | 79 | 0.259 |
|
523 |
+
| 0.0531 | 80 | 0.2115 |
|
524 |
+
| 0.0537 | 81 | 0.2226 |
|
525 |
+
| 0.0544 | 82 | 0.1994 |
|
526 |
+
| 0.0550 | 83 | 0.2424 |
|
527 |
+
| 0.0557 | 84 | 0.232 |
|
528 |
+
| 0.0564 | 85 | 0.2316 |
|
529 |
+
| 0.0570 | 86 | 0.2015 |
|
530 |
+
| 0.0577 | 87 | 0.2147 |
|
531 |
+
| 0.0584 | 88 | 0.2239 |
|
532 |
+
| 0.0590 | 89 | 0.2284 |
|
533 |
+
| 0.0597 | 90 | 0.2279 |
|
534 |
+
| 0.0603 | 91 | 0.2163 |
|
535 |
+
| 0.0610 | 92 | 0.1895 |
|
536 |
+
| 0.0617 | 93 | 0.1955 |
|
537 |
+
| 0.0623 | 94 | 0.2175 |
|
538 |
+
| 0.0630 | 95 | 0.1966 |
|
539 |
+
| 0.0637 | 96 | 0.2441 |
|
540 |
+
| 0.0643 | 97 | 0.2131 |
|
541 |
+
| 0.0650 | 98 | 0.237 |
|
542 |
+
| 0.0656 | 99 | 0.2204 |
|
543 |
+
| 0.0663 | 100 | 0.2301 |
|
544 |
+
| 0.0670 | 101 | 0.2592 |
|
545 |
+
| 0.0676 | 102 | 0.2242 |
|
546 |
+
| 0.0683 | 103 | 0.1647 |
|
547 |
+
| 0.0690 | 104 | 0.1974 |
|
548 |
+
| 0.0696 | 105 | 0.1918 |
|
549 |
+
| 0.0703 | 106 | 0.1961 |
|
550 |
+
| 0.0710 | 107 | 0.2344 |
|
551 |
+
| 0.0716 | 108 | 0.2616 |
|
552 |
+
| 0.0723 | 109 | 0.1813 |
|
553 |
+
| 0.0729 | 110 | 0.181 |
|
554 |
+
| 0.0736 | 111 | 0.2045 |
|
555 |
+
| 0.0743 | 112 | 0.2018 |
|
556 |
+
| 0.0749 | 113 | 0.2022 |
|
557 |
+
| 0.0756 | 114 | 0.182 |
|
558 |
+
| 0.0763 | 115 | 0.205 |
|
559 |
+
| 0.0769 | 116 | 0.1964 |
|
560 |
+
| 0.0776 | 117 | 0.1752 |
|
561 |
+
| 0.0782 | 118 | 0.1688 |
|
562 |
+
| 0.0789 | 119 | 0.2009 |
|
563 |
+
| 0.0796 | 120 | 0.1656 |
|
564 |
+
| 0.0802 | 121 | 0.1829 |
|
565 |
+
| 0.0809 | 122 | 0.1883 |
|
566 |
+
| 0.0816 | 123 | 0.1837 |
|
567 |
+
| 0.0822 | 124 | 0.1918 |
|
568 |
+
| 0.0829 | 125 | 0.2356 |
|
569 |
+
| 0.0836 | 126 | 0.1985 |
|
570 |
+
| 0.0842 | 127 | 0.148 |
|
571 |
+
| 0.0849 | 128 | 0.2113 |
|
572 |
+
| 0.0855 | 129 | 0.2067 |
|
573 |
+
| 0.0862 | 130 | 0.1708 |
|
574 |
+
| 0.0869 | 131 | 0.1811 |
|
575 |
+
| 0.0875 | 132 | 0.2077 |
|
576 |
+
| 0.0882 | 133 | 0.176 |
|
577 |
+
| 0.0889 | 134 | 0.1728 |
|
578 |
+
| 0.0895 | 135 | 0.2019 |
|
579 |
+
| 0.0902 | 136 | 0.1793 |
|
580 |
+
| 0.0908 | 137 | 0.1838 |
|
581 |
+
| 0.0915 | 138 | 0.1819 |
|
582 |
+
| 0.0922 | 139 | 0.1953 |
|
583 |
+
| 0.0928 | 140 | 0.1803 |
|
584 |
+
| 0.0935 | 141 | 0.1871 |
|
585 |
+
| 0.0942 | 142 | 0.2002 |
|
586 |
+
| 0.0948 | 143 | 0.2085 |
|
587 |
+
| 0.0955 | 144 | 0.164 |
|
588 |
+
| 0.0962 | 145 | 0.1886 |
|
589 |
+
| 0.0968 | 146 | 0.1814 |
|
590 |
+
| 0.0975 | 147 | 0.1801 |
|
591 |
+
| 0.0981 | 148 | 0.2046 |
|
592 |
+
| 0.0988 | 149 | 0.1829 |
|
593 |
+
| 0.0995 | 150 | 0.2409 |
|
594 |
+
| 0.1001 | 151 | 0.2051 |
|
595 |
+
| 0.1008 | 152 | 0.1791 |
|
596 |
+
| 0.1015 | 153 | 0.1738 |
|
597 |
+
| 0.1021 | 154 | 0.1972 |
|
598 |
+
| 0.1028 | 155 | 0.1674 |
|
599 |
+
| 0.1034 | 156 | 0.1743 |
|
600 |
+
| 0.1041 | 157 | 0.1784 |
|
601 |
+
| 0.1048 | 158 | 0.1728 |
|
602 |
+
| 0.1054 | 159 | 0.1648 |
|
603 |
+
| 0.1061 | 160 | 0.1597 |
|
604 |
+
| 0.1068 | 161 | 0.1476 |
|
605 |
+
| 0.1074 | 162 | 0.2036 |
|
606 |
+
| 0.1081 | 163 | 0.1591 |
|
607 |
+
| 0.1088 | 164 | 0.1471 |
|
608 |
+
| 0.1094 | 165 | 0.2037 |
|
609 |
+
| 0.1101 | 166 | 0.172 |
|
610 |
+
| 0.1107 | 167 | 0.1892 |
|
611 |
+
| 0.1114 | 168 | 0.1691 |
|
612 |
+
| 0.1121 | 169 | 0.1725 |
|
613 |
+
| 0.1127 | 170 | 0.1719 |
|
614 |
+
| 0.1134 | 171 | 0.2146 |
|
615 |
+
| 0.1141 | 172 | 0.162 |
|
616 |
+
| 0.1147 | 173 | 0.1972 |
|
617 |
+
| 0.1154 | 174 | 0.2149 |
|
618 |
+
| 0.1160 | 175 | 0.197 |
|
619 |
+
| 0.1167 | 176 | 0.1786 |
|
620 |
+
| 0.1174 | 177 | 0.1904 |
|
621 |
+
| 0.1180 | 178 | 0.1491 |
|
622 |
+
| 0.1187 | 179 | 0.2163 |
|
623 |
+
| 0.1194 | 180 | 0.1741 |
|
624 |
+
| 0.1200 | 181 | 0.1564 |
|
625 |
+
| 0.1207 | 182 | 0.1577 |
|
626 |
+
| 0.1214 | 183 | 0.1923 |
|
627 |
+
| 0.1220 | 184 | 0.1492 |
|
628 |
+
| 0.1227 | 185 | 0.1421 |
|
629 |
+
| 0.1233 | 186 | 0.1939 |
|
630 |
+
| 0.1240 | 187 | 0.1613 |
|
631 |
+
| 0.1247 | 188 | 0.1675 |
|
632 |
+
| 0.1253 | 189 | 0.1751 |
|
633 |
+
| 0.1260 | 190 | 0.2026 |
|
634 |
+
| 0.1267 | 191 | 0.2061 |
|
635 |
+
| 0.1273 | 192 | 0.1848 |
|
636 |
+
| 0.1280 | 193 | 0.1647 |
|
637 |
+
| 0.1286 | 194 | 0.1674 |
|
638 |
+
| 0.1293 | 195 | 0.1686 |
|
639 |
+
| 0.1300 | 196 | 0.1657 |
|
640 |
+
| 0.1306 | 197 | 0.1594 |
|
641 |
+
| 0.1313 | 198 | 0.1717 |
|
642 |
+
| 0.1320 | 199 | 0.1724 |
|
643 |
+
| 0.1326 | 200 | 0.1785 |
|
644 |
+
| 0.1333 | 201 | 0.195 |
|
645 |
+
| 0.1340 | 202 | 0.1678 |
|
646 |
+
| 0.1346 | 203 | 0.1819 |
|
647 |
+
| 0.1353 | 204 | 0.1544 |
|
648 |
+
| 0.1359 | 205 | 0.1588 |
|
649 |
+
| 0.1366 | 206 | 0.1874 |
|
650 |
+
| 0.1373 | 207 | 0.1476 |
|
651 |
+
| 0.1379 | 208 | 0.1879 |
|
652 |
+
| 0.1386 | 209 | 0.2016 |
|
653 |
+
| 0.1393 | 210 | 0.1687 |
|
654 |
+
| 0.1399 | 211 | 0.1813 |
|
655 |
+
| 0.1406 | 212 | 0.1486 |
|
656 |
+
| 0.1412 | 213 | 0.1789 |
|
657 |
+
| 0.1419 | 214 | 0.1789 |
|
658 |
+
| 0.1426 | 215 | 0.1659 |
|
659 |
+
| 0.1432 | 216 | 0.1796 |
|
660 |
+
| 0.1439 | 217 | 0.1343 |
|
661 |
+
| 0.1446 | 218 | 0.156 |
|
662 |
+
| 0.1452 | 219 | 0.2493 |
|
663 |
+
| 0.1459 | 220 | 0.1642 |
|
664 |
+
| 0.1466 | 221 | 0.1898 |
|
665 |
+
| 0.1472 | 222 | 0.1941 |
|
666 |
+
| 0.1479 | 223 | 0.1472 |
|
667 |
+
| 0.1485 | 224 | 0.1587 |
|
668 |
+
| 0.1492 | 225 | 0.1672 |
|
669 |
+
| 0.1499 | 226 | 0.2136 |
|
670 |
+
| 0.1505 | 227 | 0.1525 |
|
671 |
+
| 0.1512 | 228 | 0.1812 |
|
672 |
+
| 0.1519 | 229 | 0.1795 |
|
673 |
+
| 0.1525 | 230 | 0.2038 |
|
674 |
+
| 0.1532 | 231 | 0.1741 |
|
675 |
+
| 0.1538 | 232 | 0.1738 |
|
676 |
+
| 0.1545 | 233 | 0.1837 |
|
677 |
+
| 0.1552 | 234 | 0.1684 |
|
678 |
+
| 0.1558 | 235 | 0.1714 |
|
679 |
+
| 0.1565 | 236 | 0.163 |
|
680 |
+
| 0.1572 | 237 | 0.1821 |
|
681 |
+
| 0.1578 | 238 | 0.2023 |
|
682 |
+
| 0.1585 | 239 | 0.1699 |
|
683 |
+
| 0.1592 | 240 | 0.1758 |
|
684 |
+
| 0.1598 | 241 | 0.1864 |
|
685 |
+
| 0.1605 | 242 | 0.1417 |
|
686 |
+
| 0.1611 | 243 | 0.1925 |
|
687 |
+
| 0.1618 | 244 | 0.1742 |
|
688 |
+
| 0.1625 | 245 | 0.1462 |
|
689 |
+
| 0.1631 | 246 | 0.1569 |
|
690 |
+
| 0.1638 | 247 | 0.192 |
|
691 |
+
| 0.1645 | 248 | 0.1698 |
|
692 |
+
| 0.1651 | 249 | 0.1934 |
|
693 |
+
| 0.1658 | 250 | 0.2018 |
|
694 |
+
| 0.1664 | 251 | 0.164 |
|
695 |
+
| 0.1671 | 252 | 0.1359 |
|
696 |
+
| 0.1678 | 253 | 0.1963 |
|
697 |
+
| 0.1684 | 254 | 0.1888 |
|
698 |
+
| 0.1691 | 255 | 0.1725 |
|
699 |
+
| 0.1698 | 256 | 0.1814 |
|
700 |
+
| 0.1704 | 257 | 0.1815 |
|
701 |
+
| 0.1711 | 258 | 0.1673 |
|
702 |
+
| 0.1718 | 259 | 0.1751 |
|
703 |
+
| 0.1724 | 260 | 0.1725 |
|
704 |
+
| 0.1731 | 261 | 0.207 |
|
705 |
+
| 0.1737 | 262 | 0.1827 |
|
706 |
+
| 0.1744 | 263 | 0.1755 |
|
707 |
+
| 0.1751 | 264 | 0.1541 |
|
708 |
+
| 0.1757 | 265 | 0.1822 |
|
709 |
+
| 0.1764 | 266 | 0.1863 |
|
710 |
+
| 0.1771 | 267 | 0.1591 |
|
711 |
+
| 0.1777 | 268 | 0.2115 |
|
712 |
+
| 0.1784 | 269 | 0.1397 |
|
713 |
+
| 0.1790 | 270 | 0.1835 |
|
714 |
+
| 0.1797 | 271 | 0.1637 |
|
715 |
+
| 0.1804 | 272 | 0.1803 |
|
716 |
+
| 0.1810 | 273 | 0.1446 |
|
717 |
+
| 0.1817 | 274 | 0.1914 |
|
718 |
+
| 0.1824 | 275 | 0.1642 |
|
719 |
+
| 0.1830 | 276 | 0.1537 |
|
720 |
+
| 0.1837 | 277 | 0.1639 |
|
721 |
+
| 0.1844 | 278 | 0.1961 |
|
722 |
+
| 0.1850 | 279 | 0.1392 |
|
723 |
+
| 0.1857 | 280 | 0.1644 |
|
724 |
+
| 0.1863 | 281 | 0.1802 |
|
725 |
+
| 0.1870 | 282 | 0.1483 |
|
726 |
+
| 0.1877 | 283 | 0.1611 |
|
727 |
+
| 0.1883 | 284 | 0.1617 |
|
728 |
+
| 0.1890 | 285 | 0.1523 |
|
729 |
+
| 0.1897 | 286 | 0.2163 |
|
730 |
+
| 0.1903 | 287 | 0.1801 |
|
731 |
+
| 0.1910 | 288 | 0.162 |
|
732 |
+
| 0.1916 | 289 | 0.1845 |
|
733 |
+
| 0.1923 | 290 | 0.1683 |
|
734 |
+
| 0.1930 | 291 | 0.1664 |
|
735 |
+
| 0.1936 | 292 | 0.1571 |
|
736 |
+
| 0.1943 | 293 | 0.141 |
|
737 |
+
| 0.1950 | 294 | 0.168 |
|
738 |
+
| 0.1956 | 295 | 0.1879 |
|
739 |
+
| 0.1963 | 296 | 0.1566 |
|
740 |
+
| 0.1969 | 297 | 0.1592 |
|
741 |
+
| 0.1976 | 298 | 0.1592 |
|
742 |
+
| 0.1983 | 299 | 0.1829 |
|
743 |
+
| 0.1989 | 300 | 0.145 |
|
744 |
+
| 0.1996 | 301 | 0.1778 |
|
745 |
+
| 0.2003 | 302 | 0.1477 |
|
746 |
+
| 0.2009 | 303 | 0.169 |
|
747 |
+
| 0.2016 | 304 | 0.1498 |
|
748 |
+
| 0.2023 | 305 | 0.1663 |
|
749 |
+
| 0.2029 | 306 | 0.1726 |
|
750 |
+
| 0.2036 | 307 | 0.1579 |
|
751 |
+
| 0.2042 | 308 | 0.1665 |
|
752 |
+
| 0.2049 | 309 | 0.1779 |
|
753 |
+
| 0.2056 | 310 | 0.1581 |
|
754 |
+
| 0.2062 | 311 | 0.168 |
|
755 |
+
| 0.2069 | 312 | 0.1883 |
|
756 |
+
| 0.2076 | 313 | 0.1418 |
|
757 |
+
| 0.2082 | 314 | 0.123 |
|
758 |
+
| 0.2089 | 315 | 0.1688 |
|
759 |
+
| 0.2095 | 316 | 0.1573 |
|
760 |
+
| 0.2102 | 317 | 0.1902 |
|
761 |
+
| 0.2109 | 318 | 0.1524 |
|
762 |
+
| 0.2115 | 319 | 0.1767 |
|
763 |
+
| 0.2122 | 320 | 0.1516 |
|
764 |
+
| 0.2129 | 321 | 0.1454 |
|
765 |
+
| 0.2135 | 322 | 0.1803 |
|
766 |
+
| 0.2142 | 323 | 0.1475 |
|
767 |
+
| 0.2149 | 324 | 0.1442 |
|
768 |
+
| 0.2155 | 325 | 0.1488 |
|
769 |
+
| 0.2162 | 326 | 0.1638 |
|
770 |
+
| 0.2168 | 327 | 0.1608 |
|
771 |
+
| 0.2175 | 328 | 0.1525 |
|
772 |
+
| 0.2182 | 329 | 0.1929 |
|
773 |
+
| 0.2188 | 330 | 0.1932 |
|
774 |
+
| 0.2195 | 331 | 0.171 |
|
775 |
+
| 0.2202 | 332 | 0.1769 |
|
776 |
+
| 0.2208 | 333 | 0.122 |
|
777 |
+
| 0.2215 | 334 | 0.1556 |
|
778 |
+
| 0.2221 | 335 | 0.155 |
|
779 |
+
| 0.2228 | 336 | 0.1749 |
|
780 |
+
| 0.2235 | 337 | 0.1539 |
|
781 |
+
| 0.2241 | 338 | 0.166 |
|
782 |
+
| 0.2248 | 339 | 0.1552 |
|
783 |
+
| 0.2255 | 340 | 0.1924 |
|
784 |
+
| 0.2261 | 341 | 0.1437 |
|
785 |
+
| 0.2268 | 342 | 0.1501 |
|
786 |
+
| 0.2275 | 343 | 0.1688 |
|
787 |
+
| 0.2281 | 344 | 0.1639 |
|
788 |
+
| 0.2288 | 345 | 0.154 |
|
789 |
+
| 0.2294 | 346 | 0.1346 |
|
790 |
+
| 0.2301 | 347 | 0.1771 |
|
791 |
+
| 0.2308 | 348 | 0.1403 |
|
792 |
+
| 0.2314 | 349 | 0.1958 |
|
793 |
+
| 0.2321 | 350 | 0.1482 |
|
794 |
+
| 0.2328 | 351 | 0.1622 |
|
795 |
+
| 0.2334 | 352 | 0.1493 |
|
796 |
+
| 0.2341 | 353 | 0.135 |
|
797 |
+
| 0.2347 | 354 | 0.167 |
|
798 |
+
| 0.2354 | 355 | 0.1544 |
|
799 |
+
| 0.2361 | 356 | 0.1763 |
|
800 |
+
| 0.2367 | 357 | 0.1783 |
|
801 |
+
| 0.2374 | 358 | 0.1724 |
|
802 |
+
| 0.2381 | 359 | 0.153 |
|
803 |
+
| 0.2387 | 360 | 0.1516 |
|
804 |
+
| 0.2394 | 361 | 0.1353 |
|
805 |
+
| 0.2401 | 362 | 0.1623 |
|
806 |
+
| 0.2407 | 363 | 0.1794 |
|
807 |
+
| 0.2414 | 364 | 0.1495 |
|
808 |
+
| 0.2420 | 365 | 0.1562 |
|
809 |
+
| 0.2427 | 366 | 0.1887 |
|
810 |
+
| 0.2434 | 367 | 0.1577 |
|
811 |
+
| 0.2440 | 368 | 0.1501 |
|
812 |
+
| 0.2447 | 369 | 0.156 |
|
813 |
+
| 0.2454 | 370 | 0.1869 |
|
814 |
+
| 0.2460 | 371 | 0.1649 |
|
815 |
+
| 0.2467 | 372 | 0.128 |
|
816 |
+
| 0.2473 | 373 | 0.1569 |
|
817 |
+
| 0.2480 | 374 | 0.1598 |
|
818 |
+
| 0.2487 | 375 | 0.146 |
|
819 |
+
| 0.2493 | 376 | 0.1404 |
|
820 |
+
| 0.25 | 377 | 0.1441 |
|
821 |
+
| 0.2507 | 378 | 0.1738 |
|
822 |
+
| 0.2513 | 379 | 0.1358 |
|
823 |
+
| 0.2520 | 380 | 0.1828 |
|
824 |
+
| 0.2527 | 381 | 0.1952 |
|
825 |
+
| 0.2533 | 382 | 0.1575 |
|
826 |
+
| 0.2540 | 383 | 0.1582 |
|
827 |
+
| 0.2546 | 384 | 0.1729 |
|
828 |
+
| 0.2553 | 385 | 0.199 |
|
829 |
+
| 0.2560 | 386 | 0.1673 |
|
830 |
+
| 0.2566 | 387 | 0.1369 |
|
831 |
+
| 0.2573 | 388 | 0.1232 |
|
832 |
+
| 0.2580 | 389 | 0.167 |
|
833 |
+
| 0.2586 | 390 | 0.1838 |
|
834 |
+
| 0.2593 | 391 | 0.1593 |
|
835 |
+
| 0.2599 | 392 | 0.1724 |
|
836 |
+
| 0.2606 | 393 | 0.1795 |
|
837 |
+
| 0.2613 | 394 | 0.195 |
|
838 |
+
| 0.2619 | 395 | 0.1255 |
|
839 |
+
| 0.2626 | 396 | 0.157 |
|
840 |
+
| 0.2633 | 397 | 0.1512 |
|
841 |
+
| 0.2639 | 398 | 0.1472 |
|
842 |
+
| 0.2646 | 399 | 0.1846 |
|
843 |
+
| 0.2653 | 400 | 0.1793 |
|
844 |
+
| 0.2659 | 401 | 0.1451 |
|
845 |
+
| 0.2666 | 402 | 0.1979 |
|
846 |
+
| 0.2672 | 403 | 0.1612 |
|
847 |
+
| 0.2679 | 404 | 0.1481 |
|
848 |
+
| 0.2686 | 405 | 0.159 |
|
849 |
+
| 0.2692 | 406 | 0.125 |
|
850 |
+
| 0.2699 | 407 | 0.1808 |
|
851 |
+
| 0.2706 | 408 | 0.1722 |
|
852 |
+
| 0.2712 | 409 | 0.1838 |
|
853 |
+
| 0.2719 | 410 | 0.1523 |
|
854 |
+
| 0.2725 | 411 | 0.1686 |
|
855 |
+
| 0.2732 | 412 | 0.1659 |
|
856 |
+
| 0.2739 | 413 | 0.1474 |
|
857 |
+
| 0.2745 | 414 | 0.1498 |
|
858 |
+
| 0.2752 | 415 | 0.1775 |
|
859 |
+
| 0.2759 | 416 | 0.1258 |
|
860 |
+
| 0.2765 | 417 | 0.1594 |
|
861 |
+
| 0.2772 | 418 | 0.1574 |
|
862 |
+
| 0.2779 | 419 | 0.1879 |
|
863 |
+
| 0.2785 | 420 | 0.1455 |
|
864 |
+
| 0.2792 | 421 | 0.1745 |
|
865 |
+
| 0.2798 | 422 | 0.164 |
|
866 |
+
| 0.2805 | 423 | 0.1375 |
|
867 |
+
| 0.2812 | 424 | 0.163 |
|
868 |
+
| 0.2818 | 425 | 0.1338 |
|
869 |
+
| 0.2825 | 426 | 0.1933 |
|
870 |
+
| 0.2832 | 427 | 0.1464 |
|
871 |
+
| 0.2838 | 428 | 0.1534 |
|
872 |
+
| 0.2845 | 429 | 0.1407 |
|
873 |
+
| 0.2851 | 430 | 0.1574 |
|
874 |
+
| 0.2858 | 431 | 0.1379 |
|
875 |
+
| 0.2865 | 432 | 0.1525 |
|
876 |
+
| 0.2871 | 433 | 0.1533 |
|
877 |
+
| 0.2878 | 434 | 0.1646 |
|
878 |
+
| 0.2885 | 435 | 0.16 |
|
879 |
+
| 0.2891 | 436 | 0.1676 |
|
880 |
+
| 0.2898 | 437 | 0.1352 |
|
881 |
+
| 0.2905 | 438 | 0.1571 |
|
882 |
+
| 0.2911 | 439 | 0.1721 |
|
883 |
+
| 0.2918 | 440 | 0.1574 |
|
884 |
+
| 0.2924 | 441 | 0.1369 |
|
885 |
+
| 0.2931 | 442 | 0.1477 |
|
886 |
+
| 0.2938 | 443 | 0.1819 |
|
887 |
+
| 0.2944 | 444 | 0.1698 |
|
888 |
+
| 0.2951 | 445 | 0.1885 |
|
889 |
+
| 0.2958 | 446 | 0.1412 |
|
890 |
+
| 0.2964 | 447 | 0.1522 |
|
891 |
+
| 0.2971 | 448 | 0.171 |
|
892 |
+
| 0.2977 | 449 | 0.1673 |
|
893 |
+
| 0.2984 | 450 | 0.1413 |
|
894 |
+
| 0.2991 | 451 | 0.1436 |
|
895 |
+
| 0.2997 | 452 | 0.1618 |
|
896 |
+
| 0.3004 | 453 | 0.1869 |
|
897 |
+
| 0.3011 | 454 | 0.1527 |
|
898 |
+
| 0.3017 | 455 | 0.1392 |
|
899 |
+
| 0.3024 | 456 | 0.1651 |
|
900 |
+
| 0.3031 | 457 | 0.1597 |
|
901 |
+
| 0.3037 | 458 | 0.1931 |
|
902 |
+
| 0.3044 | 459 | 0.1726 |
|
903 |
+
| 0.3050 | 460 | 0.208 |
|
904 |
+
| 0.3057 | 461 | 0.1488 |
|
905 |
+
| 0.3064 | 462 | 0.1361 |
|
906 |
+
| 0.3070 | 463 | 0.169 |
|
907 |
+
| 0.3077 | 464 | 0.1576 |
|
908 |
+
| 0.3084 | 465 | 0.1777 |
|
909 |
+
| 0.3090 | 466 | 0.1475 |
|
910 |
+
| 0.3097 | 467 | 0.1574 |
|
911 |
+
| 0.3103 | 468 | 0.1778 |
|
912 |
+
| 0.3110 | 469 | 0.1503 |
|
913 |
+
| 0.3117 | 470 | 0.1509 |
|
914 |
+
| 0.3123 | 471 | 0.1686 |
|
915 |
+
| 0.3130 | 472 | 0.1445 |
|
916 |
+
| 0.3137 | 473 | 0.1562 |
|
917 |
+
| 0.3143 | 474 | 0.1554 |
|
918 |
+
| 0.3150 | 475 | 0.1494 |
|
919 |
+
| 0.3156 | 476 | 0.1376 |
|
920 |
+
| 0.3163 | 477 | 0.1409 |
|
921 |
+
| 0.3170 | 478 | 0.1821 |
|
922 |
+
| 0.3176 | 479 | 0.144 |
|
923 |
+
| 0.3183 | 480 | 0.196 |
|
924 |
+
| 0.3190 | 481 | 0.1643 |
|
925 |
+
| 0.3196 | 482 | 0.1797 |
|
926 |
+
| 0.3203 | 483 | 0.1525 |
|
927 |
+
| 0.3210 | 484 | 0.1532 |
|
928 |
+
| 0.3216 | 485 | 0.1642 |
|
929 |
+
| 0.3223 | 486 | 0.1552 |
|
930 |
+
| 0.3229 | 487 | 0.151 |
|
931 |
+
| 0.3236 | 488 | 0.1689 |
|
932 |
+
| 0.3243 | 489 | 0.1379 |
|
933 |
+
| 0.3249 | 490 | 0.1493 |
|
934 |
+
| 0.3256 | 491 | 0.143 |
|
935 |
+
| 0.3263 | 492 | 0.1344 |
|
936 |
+
| 0.3269 | 493 | 0.1635 |
|
937 |
+
| 0.3276 | 494 | 0.1583 |
|
938 |
+
| 0.3282 | 495 | 0.1413 |
|
939 |
+
| 0.3289 | 496 | 0.1541 |
|
940 |
+
| 0.3296 | 497 | 0.1406 |
|
941 |
+
| 0.3302 | 498 | 0.1869 |
|
942 |
+
| 0.3309 | 499 | 0.1212 |
|
943 |
+
| 0.3316 | 500 | 0.1671 |
|
944 |
+
| 0.3322 | 501 | 0.1458 |
|
945 |
+
| 0.3329 | 502 | 0.1581 |
|
946 |
+
| 0.3336 | 503 | 0.143 |
|
947 |
+
| 0.3342 | 504 | 0.1623 |
|
948 |
+
| 0.3349 | 505 | 0.1499 |
|
949 |
+
| 0.3355 | 506 | 0.1613 |
|
950 |
+
| 0.3362 | 507 | 0.1778 |
|
951 |
+
| 0.3369 | 508 | 0.145 |
|
952 |
+
| 0.3375 | 509 | 0.1725 |
|
953 |
+
| 0.3382 | 510 | 0.1446 |
|
954 |
+
| 0.3389 | 511 | 0.1301 |
|
955 |
+
| 0.3395 | 512 | 0.146 |
|
956 |
+
| 0.3402 | 513 | 0.1352 |
|
957 |
+
| 0.3408 | 514 | 0.1462 |
|
958 |
+
| 0.3415 | 515 | 0.1585 |
|
959 |
+
| 0.3422 | 516 | 0.1566 |
|
960 |
+
| 0.3428 | 517 | 0.128 |
|
961 |
+
| 0.3435 | 518 | 0.1547 |
|
962 |
+
| 0.3442 | 519 | 0.1532 |
|
963 |
+
| 0.3448 | 520 | 0.1522 |
|
964 |
+
| 0.3455 | 521 | 0.1277 |
|
965 |
+
| 0.3462 | 522 | 0.1482 |
|
966 |
+
| 0.3468 | 523 | 0.1356 |
|
967 |
+
| 0.3475 | 524 | 0.1564 |
|
968 |
+
| 0.3481 | 525 | 0.1525 |
|
969 |
+
| 0.3488 | 526 | 0.1639 |
|
970 |
+
| 0.3495 | 527 | 0.1377 |
|
971 |
+
| 0.3501 | 528 | 0.1811 |
|
972 |
+
| 0.3508 | 529 | 0.1376 |
|
973 |
+
| 0.3515 | 530 | 0.1371 |
|
974 |
+
| 0.3521 | 531 | 0.1379 |
|
975 |
+
| 0.3528 | 532 | 0.1612 |
|
976 |
+
| 0.3534 | 533 | 0.1484 |
|
977 |
+
| 0.3541 | 534 | 0.1314 |
|
978 |
+
| 0.3548 | 535 | 0.1654 |
|
979 |
+
| 0.3554 | 536 | 0.132 |
|
980 |
+
| 0.3561 | 537 | 0.1285 |
|
981 |
+
| 0.3568 | 538 | 0.1697 |
|
982 |
+
| 0.3574 | 539 | 0.1517 |
|
983 |
+
| 0.3581 | 540 | 0.1489 |
|
984 |
+
| 0.3588 | 541 | 0.1494 |
|
985 |
+
| 0.3594 | 542 | 0.1823 |
|
986 |
+
| 0.3601 | 543 | 0.1623 |
|
987 |
+
| 0.3607 | 544 | 0.1699 |
|
988 |
+
| 0.3614 | 545 | 0.1822 |
|
989 |
+
| 0.3621 | 546 | 0.1245 |
|
990 |
+
| 0.3627 | 547 | 0.1508 |
|
991 |
+
| 0.3634 | 548 | 0.1662 |
|
992 |
+
| 0.3641 | 549 | 0.1954 |
|
993 |
+
| 0.3647 | 550 | 0.1198 |
|
994 |
+
| 0.3654 | 551 | 0.1268 |
|
995 |
+
| 0.3660 | 552 | 0.1751 |
|
996 |
+
| 0.3667 | 553 | 0.1451 |
|
997 |
+
| 0.3674 | 554 | 0.1522 |
|
998 |
+
| 0.3680 | 555 | 0.1558 |
|
999 |
+
| 0.3687 | 556 | 0.1357 |
|
1000 |
+
| 0.3694 | 557 | 0.1688 |
|
1001 |
+
| 0.3700 | 558 | 0.1448 |
|
1002 |
+
| 0.3707 | 559 | 0.1713 |
|
1003 |
+
| 0.3714 | 560 | 0.1427 |
|
1004 |
+
| 0.3720 | 561 | 0.1594 |
|
1005 |
+
| 0.3727 | 562 | 0.1596 |
|
1006 |
+
| 0.3733 | 563 | 0.1762 |
|
1007 |
+
| 0.3740 | 564 | 0.1453 |
|
1008 |
+
| 0.3747 | 565 | 0.1397 |
|
1009 |
+
| 0.3753 | 566 | 0.1664 |
|
1010 |
+
| 0.3760 | 567 | 0.1493 |
|
1011 |
+
| 0.3767 | 568 | 0.1467 |
|
1012 |
+
| 0.3773 | 569 | 0.1393 |
|
1013 |
+
| 0.3780 | 570 | 0.1463 |
|
1014 |
+
| 0.3786 | 571 | 0.1551 |
|
1015 |
+
| 0.3793 | 572 | 0.1962 |
|
1016 |
+
| 0.3800 | 573 | 0.1681 |
|
1017 |
+
| 0.3806 | 574 | 0.1759 |
|
1018 |
+
| 0.3813 | 575 | 0.1948 |
|
1019 |
+
| 0.3820 | 576 | 0.1732 |
|
1020 |
+
| 0.3826 | 577 | 0.1707 |
|
1021 |
+
| 0.3833 | 578 | 0.1243 |
|
1022 |
+
| 0.3840 | 579 | 0.1754 |
|
1023 |
+
| 0.3846 | 580 | 0.1582 |
|
1024 |
+
| 0.3853 | 581 | 0.1565 |
|
1025 |
+
| 0.3859 | 582 | 0.148 |
|
1026 |
+
| 0.3866 | 583 | 0.1528 |
|
1027 |
+
| 0.3873 | 584 | 0.1478 |
|
1028 |
+
| 0.3879 | 585 | 0.1363 |
|
1029 |
+
| 0.3886 | 586 | 0.1578 |
|
1030 |
+
| 0.3893 | 587 | 0.1648 |
|
1031 |
+
| 0.3899 | 588 | 0.1619 |
|
1032 |
+
| 0.3906 | 589 | 0.1471 |
|
1033 |
+
| 0.3912 | 590 | 0.1552 |
|
1034 |
+
| 0.3919 | 591 | 0.1432 |
|
1035 |
+
| 0.3926 | 592 | 0.1418 |
|
1036 |
+
| 0.3932 | 593 | 0.1765 |
|
1037 |
+
| 0.3939 | 594 | 0.1712 |
|
1038 |
+
| 0.3946 | 595 | 0.1697 |
|
1039 |
+
| 0.3952 | 596 | 0.1545 |
|
1040 |
+
| 0.3959 | 597 | 0.177 |
|
1041 |
+
| 0.3966 | 598 | 0.1194 |
|
1042 |
+
| 0.3972 | 599 | 0.1789 |
|
1043 |
+
| 0.3979 | 600 | 0.1403 |
|
1044 |
+
| 0.3985 | 601 | 0.1357 |
|
1045 |
+
| 0.3992 | 602 | 0.1588 |
|
1046 |
+
| 0.3999 | 603 | 0.1471 |
|
1047 |
+
| 0.4005 | 604 | 0.1593 |
|
1048 |
+
| 0.4012 | 605 | 0.1507 |
|
1049 |
+
| 0.4019 | 606 | 0.1458 |
|
1050 |
+
| 0.4025 | 607 | 0.1384 |
|
1051 |
+
| 0.4032 | 608 | 0.1494 |
|
1052 |
+
| 0.4038 | 609 | 0.1185 |
|
1053 |
+
| 0.4045 | 610 | 0.164 |
|
1054 |
+
| 0.4052 | 611 | 0.1696 |
|
1055 |
+
| 0.4058 | 612 | 0.1629 |
|
1056 |
+
| 0.4065 | 613 | 0.1511 |
|
1057 |
+
| 0.4072 | 614 | 0.1295 |
|
1058 |
+
| 0.4078 | 615 | 0.1583 |
|
1059 |
+
| 0.4085 | 616 | 0.1277 |
|
1060 |
+
| 0.4092 | 617 | 0.1538 |
|
1061 |
+
| 0.4098 | 618 | 0.162 |
|
1062 |
+
| 0.4105 | 619 | 0.1394 |
|
1063 |
+
| 0.4111 | 620 | 0.1504 |
|
1064 |
+
| 0.4118 | 621 | 0.1511 |
|
1065 |
+
| 0.4125 | 622 | 0.1783 |
|
1066 |
+
| 0.4131 | 623 | 0.1285 |
|
1067 |
+
| 0.4138 | 624 | 0.1371 |
|
1068 |
+
| 0.4145 | 625 | 0.1655 |
|
1069 |
+
| 0.4151 | 626 | 0.1374 |
|
1070 |
+
| 0.4158 | 627 | 0.1299 |
|
1071 |
+
| 0.4164 | 628 | 0.1567 |
|
1072 |
+
| 0.4171 | 629 | 0.1436 |
|
1073 |
+
| 0.4178 | 630 | 0.1519 |
|
1074 |
+
| 0.4184 | 631 | 0.1228 |
|
1075 |
+
| 0.4191 | 632 | 0.1318 |
|
1076 |
+
| 0.4198 | 633 | 0.1523 |
|
1077 |
+
| 0.4204 | 634 | 0.1436 |
|
1078 |
+
| 0.4211 | 635 | 0.1596 |
|
1079 |
+
| 0.4218 | 636 | 0.1582 |
|
1080 |
+
| 0.4224 | 637 | 0.1529 |
|
1081 |
+
| 0.4231 | 638 | 0.1487 |
|
1082 |
+
| 0.4237 | 639 | 0.1086 |
|
1083 |
+
| 0.4244 | 640 | 0.1371 |
|
1084 |
+
| 0.4251 | 641 | 0.1579 |
|
1085 |
+
| 0.4257 | 642 | 0.1484 |
|
1086 |
+
| 0.4264 | 643 | 0.1621 |
|
1087 |
+
| 0.4271 | 644 | 0.1618 |
|
1088 |
+
| 0.4277 | 645 | 0.136 |
|
1089 |
+
| 0.4284 | 646 | 0.1313 |
|
1090 |
+
| 0.4290 | 647 | 0.1465 |
|
1091 |
+
| 0.4297 | 648 | 0.1926 |
|
1092 |
+
| 0.4304 | 649 | 0.1722 |
|
1093 |
+
| 0.4310 | 650 | 0.1301 |
|
1094 |
+
| 0.4317 | 651 | 0.1497 |
|
1095 |
+
| 0.4324 | 652 | 0.1765 |
|
1096 |
+
| 0.4330 | 653 | 0.148 |
|
1097 |
+
| 0.4337 | 654 | 0.1544 |
|
1098 |
+
| 0.4344 | 655 | 0.1641 |
|
1099 |
+
| 0.4350 | 656 | 0.142 |
|
1100 |
+
| 0.4357 | 657 | 0.1528 |
|
1101 |
+
| 0.4363 | 658 | 0.1589 |
|
1102 |
+
| 0.4370 | 659 | 0.1318 |
|
1103 |
+
| 0.4377 | 660 | 0.143 |
|
1104 |
+
| 0.4383 | 661 | 0.1523 |
|
1105 |
+
| 0.4390 | 662 | 0.1448 |
|
1106 |
+
| 0.4397 | 663 | 0.1473 |
|
1107 |
+
| 0.4403 | 664 | 0.1137 |
|
1108 |
+
| 0.4410 | 665 | 0.1481 |
|
1109 |
+
| 0.4416 | 666 | 0.1701 |
|
1110 |
+
| 0.4423 | 667 | 0.1663 |
|
1111 |
+
| 0.4430 | 668 | 0.1602 |
|
1112 |
+
| 0.4436 | 669 | 0.188 |
|
1113 |
+
| 0.4443 | 670 | 0.1723 |
|
1114 |
+
| 0.4450 | 671 | 0.183 |
|
1115 |
+
| 0.4456 | 672 | 0.1696 |
|
1116 |
+
| 0.4463 | 673 | 0.1291 |
|
1117 |
+
| 0.4469 | 674 | 0.1377 |
|
1118 |
+
| 0.4476 | 675 | 0.1779 |
|
1119 |
+
| 0.4483 | 676 | 0.1614 |
|
1120 |
+
| 0.4489 | 677 | 0.1361 |
|
1121 |
+
| 0.4496 | 678 | 0.1553 |
|
1122 |
+
| 0.4503 | 679 | 0.1487 |
|
1123 |
+
| 0.4509 | 680 | 0.1495 |
|
1124 |
+
| 0.4516 | 681 | 0.1445 |
|
1125 |
+
| 0.4523 | 682 | 0.1394 |
|
1126 |
+
| 0.4529 | 683 | 0.1329 |
|
1127 |
+
| 0.4536 | 684 | 0.136 |
|
1128 |
+
| 0.4542 | 685 | 0.1543 |
|
1129 |
+
| 0.4549 | 686 | 0.1387 |
|
1130 |
+
| 0.4556 | 687 | 0.1457 |
|
1131 |
+
| 0.4562 | 688 | 0.1453 |
|
1132 |
+
| 0.4569 | 689 | 0.1439 |
|
1133 |
+
| 0.4576 | 690 | 0.1501 |
|
1134 |
+
| 0.4582 | 691 | 0.1585 |
|
1135 |
+
| 0.4589 | 692 | 0.1753 |
|
1136 |
+
| 0.4595 | 693 | 0.1313 |
|
1137 |
+
| 0.4602 | 694 | 0.1305 |
|
1138 |
+
| 0.4609 | 695 | 0.144 |
|
1139 |
+
| 0.4615 | 696 | 0.1553 |
|
1140 |
+
| 0.4622 | 697 | 0.1543 |
|
1141 |
+
| 0.4629 | 698 | 0.1569 |
|
1142 |
+
| 0.4635 | 699 | 0.1515 |
|
1143 |
+
| 0.4642 | 700 | 0.1532 |
|
1144 |
+
| 0.4649 | 701 | 0.161 |
|
1145 |
+
| 0.4655 | 702 | 0.1229 |
|
1146 |
+
| 0.4662 | 703 | 0.1695 |
|
1147 |
+
| 0.4668 | 704 | 0.1503 |
|
1148 |
+
| 0.4675 | 705 | 0.1529 |
|
1149 |
+
| 0.4682 | 706 | 0.1465 |
|
1150 |
+
| 0.4688 | 707 | 0.1927 |
|
1151 |
+
| 0.4695 | 708 | 0.1549 |
|
1152 |
+
| 0.4702 | 709 | 0.1487 |
|
1153 |
+
| 0.4708 | 710 | 0.1425 |
|
1154 |
+
| 0.4715 | 711 | 0.1569 |
|
1155 |
+
| 0.4721 | 712 | 0.1455 |
|
1156 |
+
| 0.4728 | 713 | 0.1556 |
|
1157 |
+
| 0.4735 | 714 | 0.1441 |
|
1158 |
+
| 0.4741 | 715 | 0.1449 |
|
1159 |
+
| 0.4748 | 716 | 0.1752 |
|
1160 |
+
| 0.4755 | 717 | 0.177 |
|
1161 |
+
| 0.4761 | 718 | 0.1621 |
|
1162 |
+
| 0.4768 | 719 | 0.1697 |
|
1163 |
+
| 0.4775 | 720 | 0.1843 |
|
1164 |
+
| 0.4781 | 721 | 0.1858 |
|
1165 |
+
| 0.4788 | 722 | 0.1526 |
|
1166 |
+
| 0.4794 | 723 | 0.1391 |
|
1167 |
+
| 0.4801 | 724 | 0.1421 |
|
1168 |
+
| 0.4808 | 725 | 0.1563 |
|
1169 |
+
| 0.4814 | 726 | 0.1562 |
|
1170 |
+
| 0.4821 | 727 | 0.1783 |
|
1171 |
+
| 0.4828 | 728 | 0.1553 |
|
1172 |
+
| 0.4834 | 729 | 0.1513 |
|
1173 |
+
| 0.4841 | 730 | 0.1686 |
|
1174 |
+
| 0.4847 | 731 | 0.1467 |
|
1175 |
+
| 0.4854 | 732 | 0.1902 |
|
1176 |
+
| 0.4861 | 733 | 0.1607 |
|
1177 |
+
| 0.4867 | 734 | 0.1259 |
|
1178 |
+
| 0.4874 | 735 | 0.1559 |
|
1179 |
+
| 0.4881 | 736 | 0.1611 |
|
1180 |
+
| 0.4887 | 737 | 0.1529 |
|
1181 |
+
| 0.4894 | 738 | 0.197 |
|
1182 |
+
| 0.4901 | 739 | 0.124 |
|
1183 |
+
| 0.4907 | 740 | 0.1382 |
|
1184 |
+
| 0.4914 | 741 | 0.1277 |
|
1185 |
+
| 0.4920 | 742 | 0.1247 |
|
1186 |
+
| 0.4927 | 743 | 0.1399 |
|
1187 |
+
| 0.4934 | 744 | 0.1676 |
|
1188 |
+
| 0.4940 | 745 | 0.1403 |
|
1189 |
+
| 0.4947 | 746 | 0.1258 |
|
1190 |
+
| 0.4954 | 747 | 0.1515 |
|
1191 |
+
| 0.4960 | 748 | 0.1464 |
|
1192 |
+
| 0.4967 | 749 | 0.1598 |
|
1193 |
+
| 0.4973 | 750 | 0.1587 |
|
1194 |
+
| 0.4980 | 751 | 0.1852 |
|
1195 |
+
| 0.4987 | 752 | 0.1101 |
|
1196 |
+
| 0.4993 | 753 | 0.1484 |
|
1197 |
+
| 0.5 | 754 | 0.1499 |
|
1198 |
+
| 0.5007 | 755 | 0.1234 |
|
1199 |
+
| 0.5013 | 756 | 0.1408 |
|
1200 |
+
| 0.5020 | 757 | 0.1387 |
|
1201 |
+
| 0.5027 | 758 | 0.1285 |
|
1202 |
+
| 0.5033 | 759 | 0.1236 |
|
1203 |
+
| 0.5040 | 760 | 0.1543 |
|
1204 |
+
| 0.5046 | 761 | 0.133 |
|
1205 |
+
| 0.5053 | 762 | 0.132 |
|
1206 |
+
| 0.5060 | 763 | 0.1376 |
|
1207 |
+
| 0.5066 | 764 | 0.1332 |
|
1208 |
+
| 0.5073 | 765 | 0.1588 |
|
1209 |
+
| 0.5080 | 766 | 0.1195 |
|
1210 |
+
| 0.5086 | 767 | 0.129 |
|
1211 |
+
| 0.5093 | 768 | 0.1419 |
|
1212 |
+
| 0.5099 | 769 | 0.1334 |
|
1213 |
+
| 0.5106 | 770 | 0.152 |
|
1214 |
+
| 0.5113 | 771 | 0.1767 |
|
1215 |
+
| 0.5119 | 772 | 0.1538 |
|
1216 |
+
| 0.5126 | 773 | 0.1434 |
|
1217 |
+
| 0.5133 | 774 | 0.1506 |
|
1218 |
+
| 0.5139 | 775 | 0.1356 |
|
1219 |
+
| 0.5146 | 776 | 0.1491 |
|
1220 |
+
| 0.5153 | 777 | 0.1665 |
|
1221 |
+
| 0.5159 | 778 | 0.1561 |
|
1222 |
+
| 0.5166 | 779 | 0.1398 |
|
1223 |
+
| 0.5172 | 780 | 0.1591 |
|
1224 |
+
| 0.5179 | 781 | 0.1375 |
|
1225 |
+
| 0.5186 | 782 | 0.1512 |
|
1226 |
+
| 0.5192 | 783 | 0.1462 |
|
1227 |
+
| 0.5199 | 784 | 0.1539 |
|
1228 |
+
| 0.5206 | 785 | 0.154 |
|
1229 |
+
| 0.5212 | 786 | 0.1378 |
|
1230 |
+
| 0.5219 | 787 | 0.1341 |
|
1231 |
+
| 0.5225 | 788 | 0.1888 |
|
1232 |
+
| 0.5232 | 789 | 0.1413 |
|
1233 |
+
| 0.5239 | 790 | 0.171 |
|
1234 |
+
| 0.5245 | 791 | 0.1357 |
|
1235 |
+
| 0.5252 | 792 | 0.1621 |
|
1236 |
+
| 0.5259 | 793 | 0.1629 |
|
1237 |
+
| 0.5265 | 794 | 0.1315 |
|
1238 |
+
| 0.5272 | 795 | 0.1517 |
|
1239 |
+
| 0.5279 | 796 | 0.1221 |
|
1240 |
+
| 0.5285 | 797 | 0.1528 |
|
1241 |
+
| 0.5292 | 798 | 0.152 |
|
1242 |
+
| 0.5298 | 799 | 0.1105 |
|
1243 |
+
| 0.5305 | 800 | 0.1638 |
|
1244 |
+
| 0.5312 | 801 | 0.1464 |
|
1245 |
+
| 0.5318 | 802 | 0.1473 |
|
1246 |
+
| 0.5325 | 803 | 0.1184 |
|
1247 |
+
| 0.5332 | 804 | 0.1859 |
|
1248 |
+
| 0.5338 | 805 | 0.141 |
|
1249 |
+
| 0.5345 | 806 | 0.1408 |
|
1250 |
+
| 0.5351 | 807 | 0.1136 |
|
1251 |
+
| 0.5358 | 808 | 0.1531 |
|
1252 |
+
| 0.5365 | 809 | 0.1398 |
|
1253 |
+
| 0.5371 | 810 | 0.1681 |
|
1254 |
+
| 0.5378 | 811 | 0.1521 |
|
1255 |
+
| 0.5385 | 812 | 0.1484 |
|
1256 |
+
| 0.5391 | 813 | 0.1545 |
|
1257 |
+
| 0.5398 | 814 | 0.1768 |
|
1258 |
+
| 0.5405 | 815 | 0.1471 |
|
1259 |
+
| 0.5411 | 816 | 0.1413 |
|
1260 |
+
| 0.5418 | 817 | 0.1349 |
|
1261 |
+
| 0.5424 | 818 | 0.141 |
|
1262 |
+
| 0.5431 | 819 | 0.1634 |
|
1263 |
+
| 0.5438 | 820 | 0.1419 |
|
1264 |
+
| 0.5444 | 821 | 0.153 |
|
1265 |
+
| 0.5451 | 822 | 0.166 |
|
1266 |
+
| 0.5458 | 823 | 0.1491 |
|
1267 |
+
| 0.5464 | 824 | 0.1363 |
|
1268 |
+
| 0.5471 | 825 | 0.1667 |
|
1269 |
+
| 0.5477 | 826 | 0.1605 |
|
1270 |
+
| 0.5484 | 827 | 0.1481 |
|
1271 |
+
| 0.5491 | 828 | 0.1731 |
|
1272 |
+
| 0.5497 | 829 | 0.1626 |
|
1273 |
+
| 0.5504 | 830 | 0.1628 |
|
1274 |
+
| 0.5511 | 831 | 0.1554 |
|
1275 |
+
| 0.5517 | 832 | 0.1213 |
|
1276 |
+
| 0.5524 | 833 | 0.1461 |
|
1277 |
+
| 0.5531 | 834 | 0.1787 |
|
1278 |
+
| 0.5537 | 835 | 0.1714 |
|
1279 |
+
| 0.5544 | 836 | 0.159 |
|
1280 |
+
| 0.5550 | 837 | 0.1605 |
|
1281 |
+
| 0.5557 | 838 | 0.1622 |
|
1282 |
+
| 0.5564 | 839 | 0.1502 |
|
1283 |
+
| 0.5570 | 840 | 0.1629 |
|
1284 |
+
| 0.5577 | 841 | 0.1468 |
|
1285 |
+
| 0.5584 | 842 | 0.1479 |
|
1286 |
+
| 0.5590 | 843 | 0.1281 |
|
1287 |
+
| 0.5597 | 844 | 0.1478 |
|
1288 |
+
| 0.5603 | 845 | 0.1497 |
|
1289 |
+
| 0.5610 | 846 | 0.1516 |
|
1290 |
+
| 0.5617 | 847 | 0.1434 |
|
1291 |
+
| 0.5623 | 848 | 0.1397 |
|
1292 |
+
| 0.5630 | 849 | 0.1153 |
|
1293 |
+
| 0.5637 | 850 | 0.1787 |
|
1294 |
+
| 0.5643 | 851 | 0.1342 |
|
1295 |
+
| 0.5650 | 852 | 0.139 |
|
1296 |
+
| 0.5656 | 853 | 0.142 |
|
1297 |
+
| 0.5663 | 854 | 0.1438 |
|
1298 |
+
| 0.5670 | 855 | 0.1596 |
|
1299 |
+
| 0.5676 | 856 | 0.1263 |
|
1300 |
+
| 0.5683 | 857 | 0.1506 |
|
1301 |
+
| 0.5690 | 858 | 0.1338 |
|
1302 |
+
| 0.5696 | 859 | 0.1481 |
|
1303 |
+
| 0.5703 | 860 | 0.1599 |
|
1304 |
+
| 0.5710 | 861 | 0.1516 |
|
1305 |
+
| 0.5716 | 862 | 0.1305 |
|
1306 |
+
| 0.5723 | 863 | 0.1355 |
|
1307 |
+
| 0.5729 | 864 | 0.1408 |
|
1308 |
+
| 0.5736 | 865 | 0.1712 |
|
1309 |
+
| 0.5743 | 866 | 0.1473 |
|
1310 |
+
| 0.5749 | 867 | 0.1337 |
|
1311 |
+
| 0.5756 | 868 | 0.1336 |
|
1312 |
+
| 0.5763 | 869 | 0.1501 |
|
1313 |
+
| 0.5769 | 870 | 0.1387 |
|
1314 |
+
| 0.5776 | 871 | 0.1618 |
|
1315 |
+
| 0.5782 | 872 | 0.147 |
|
1316 |
+
| 0.5789 | 873 | 0.1617 |
|
1317 |
+
| 0.5796 | 874 | 0.1403 |
|
1318 |
+
| 0.5802 | 875 | 0.1548 |
|
1319 |
+
| 0.5809 | 876 | 0.1265 |
|
1320 |
+
| 0.5816 | 877 | 0.1286 |
|
1321 |
+
| 0.5822 | 878 | 0.1439 |
|
1322 |
+
| 0.5829 | 879 | 0.1589 |
|
1323 |
+
| 0.5836 | 880 | 0.1584 |
|
1324 |
+
| 0.5842 | 881 | 0.1177 |
|
1325 |
+
| 0.5849 | 882 | 0.1322 |
|
1326 |
+
| 0.5855 | 883 | 0.1212 |
|
1327 |
+
| 0.5862 | 884 | 0.1642 |
|
1328 |
+
| 0.5869 | 885 | 0.1123 |
|
1329 |
+
| 0.5875 | 886 | 0.1614 |
|
1330 |
+
| 0.5882 | 887 | 0.1327 |
|
1331 |
+
| 0.5889 | 888 | 0.1539 |
|
1332 |
+
| 0.5895 | 889 | 0.1282 |
|
1333 |
+
| 0.5902 | 890 | 0.1272 |
|
1334 |
+
| 0.5908 | 891 | 0.1414 |
|
1335 |
+
| 0.5915 | 892 | 0.1398 |
|
1336 |
+
| 0.5922 | 893 | 0.1616 |
|
1337 |
+
| 0.5928 | 894 | 0.1305 |
|
1338 |
+
| 0.5935 | 895 | 0.1809 |
|
1339 |
+
| 0.5942 | 896 | 0.1357 |
|
1340 |
+
| 0.5948 | 897 | 0.1316 |
|
1341 |
+
| 0.5955 | 898 | 0.1497 |
|
1342 |
+
| 0.5962 | 899 | 0.1455 |
|
1343 |
+
| 0.5968 | 900 | 0.1281 |
|
1344 |
+
| 0.5975 | 901 | 0.157 |
|
1345 |
+
| 0.5981 | 902 | 0.1655 |
|
1346 |
+
| 0.5988 | 903 | 0.1311 |
|
1347 |
+
| 0.5995 | 904 | 0.1492 |
|
1348 |
+
| 0.6001 | 905 | 0.1346 |
|
1349 |
+
| 0.6008 | 906 | 0.1898 |
|
1350 |
+
| 0.6015 | 907 | 0.159 |
|
1351 |
+
| 0.6021 | 908 | 0.1285 |
|
1352 |
+
| 0.6028 | 909 | 0.1632 |
|
1353 |
+
| 0.6034 | 910 | 0.1367 |
|
1354 |
+
| 0.6041 | 911 | 0.1353 |
|
1355 |
+
| 0.6048 | 912 | 0.1255 |
|
1356 |
+
| 0.6054 | 913 | 0.1766 |
|
1357 |
+
| 0.6061 | 914 | 0.1434 |
|
1358 |
+
| 0.6068 | 915 | 0.1213 |
|
1359 |
+
| 0.6074 | 916 | 0.1439 |
|
1360 |
+
| 0.6081 | 917 | 0.1422 |
|
1361 |
+
| 0.6088 | 918 | 0.1753 |
|
1362 |
+
| 0.6094 | 919 | 0.1475 |
|
1363 |
+
| 0.6101 | 920 | 0.1362 |
|
1364 |
+
| 0.6107 | 921 | 0.1596 |
|
1365 |
+
| 0.6114 | 922 | 0.1202 |
|
1366 |
+
| 0.6121 | 923 | 0.1161 |
|
1367 |
+
| 0.6127 | 924 | 0.1589 |
|
1368 |
+
| 0.6134 | 925 | 0.1559 |
|
1369 |
+
| 0.6141 | 926 | 0.1407 |
|
1370 |
+
| 0.6147 | 927 | 0.1308 |
|
1371 |
+
| 0.6154 | 928 | 0.1643 |
|
1372 |
+
| 0.6160 | 929 | 0.1427 |
|
1373 |
+
| 0.6167 | 930 | 0.1409 |
|
1374 |
+
| 0.6174 | 931 | 0.1291 |
|
1375 |
+
| 0.6180 | 932 | 0.1336 |
|
1376 |
+
| 0.6187 | 933 | 0.1631 |
|
1377 |
+
| 0.6194 | 934 | 0.1472 |
|
1378 |
+
| 0.6200 | 935 | 0.1397 |
|
1379 |
+
| 0.6207 | 936 | 0.1407 |
|
1380 |
+
| 0.6214 | 937 | 0.1336 |
|
1381 |
+
| 0.6220 | 938 | 0.1456 |
|
1382 |
+
| 0.6227 | 939 | 0.1073 |
|
1383 |
+
| 0.6233 | 940 | 0.1426 |
|
1384 |
+
| 0.6240 | 941 | 0.1459 |
|
1385 |
+
| 0.6247 | 942 | 0.127 |
|
1386 |
+
| 0.6253 | 943 | 0.1466 |
|
1387 |
+
| 0.6260 | 944 | 0.1424 |
|
1388 |
+
| 0.6267 | 945 | 0.1318 |
|
1389 |
+
| 0.6273 | 946 | 0.136 |
|
1390 |
+
| 0.6280 | 947 | 0.1577 |
|
1391 |
+
| 0.6286 | 948 | 0.1168 |
|
1392 |
+
| 0.6293 | 949 | 0.1346 |
|
1393 |
+
| 0.6300 | 950 | 0.1666 |
|
1394 |
+
| 0.6306 | 951 | 0.1474 |
|
1395 |
+
| 0.6313 | 952 | 0.1162 |
|
1396 |
+
| 0.6320 | 953 | 0.12 |
|
1397 |
+
| 0.6326 | 954 | 0.1148 |
|
1398 |
+
| 0.6333 | 955 | 0.132 |
|
1399 |
+
| 0.6340 | 956 | 0.1709 |
|
1400 |
+
| 0.6346 | 957 | 0.1416 |
|
1401 |
+
| 0.6353 | 958 | 0.141 |
|
1402 |
+
| 0.6359 | 959 | 0.1301 |
|
1403 |
+
| 0.6366 | 960 | 0.1333 |
|
1404 |
+
| 0.6373 | 961 | 0.1362 |
|
1405 |
+
| 0.6379 | 962 | 0.1381 |
|
1406 |
+
| 0.6386 | 963 | 0.1804 |
|
1407 |
+
| 0.6393 | 964 | 0.1333 |
|
1408 |
+
| 0.6399 | 965 | 0.1586 |
|
1409 |
+
| 0.6406 | 966 | 0.1711 |
|
1410 |
+
| 0.6412 | 967 | 0.1472 |
|
1411 |
+
| 0.6419 | 968 | 0.1512 |
|
1412 |
+
| 0.6426 | 969 | 0.1465 |
|
1413 |
+
| 0.6432 | 970 | 0.1601 |
|
1414 |
+
| 0.6439 | 971 | 0.1434 |
|
1415 |
+
| 0.6446 | 972 | 0.1319 |
|
1416 |
+
| 0.6452 | 973 | 0.1992 |
|
1417 |
+
| 0.6459 | 974 | 0.1389 |
|
1418 |
+
| 0.6466 | 975 | 0.1822 |
|
1419 |
+
| 0.6472 | 976 | 0.1606 |
|
1420 |
+
| 0.6479 | 977 | 0.1896 |
|
1421 |
+
| 0.6485 | 978 | 0.136 |
|
1422 |
+
| 0.6492 | 979 | 0.1368 |
|
1423 |
+
| 0.6499 | 980 | 0.1367 |
|
1424 |
+
| 0.6505 | 981 | 0.1278 |
|
1425 |
+
| 0.6512 | 982 | 0.1473 |
|
1426 |
+
| 0.6519 | 983 | 0.1482 |
|
1427 |
+
| 0.6525 | 984 | 0.1461 |
|
1428 |
+
| 0.6532 | 985 | 0.1822 |
|
1429 |
+
| 0.6538 | 986 | 0.1436 |
|
1430 |
+
| 0.6545 | 987 | 0.1549 |
|
1431 |
+
| 0.6552 | 988 | 0.1194 |
|
1432 |
+
| 0.6558 | 989 | 0.1082 |
|
1433 |
+
| 0.6565 | 990 | 0.1398 |
|
1434 |
+
| 0.6572 | 991 | 0.113 |
|
1435 |
+
| 0.6578 | 992 | 0.1376 |
|
1436 |
+
| 0.6585 | 993 | 0.1849 |
|
1437 |
+
| 0.6592 | 994 | 0.1665 |
|
1438 |
+
| 0.6598 | 995 | 0.1503 |
|
1439 |
+
| 0.6605 | 996 | 0.1498 |
|
1440 |
+
| 0.6611 | 997 | 0.1335 |
|
1441 |
+
| 0.6618 | 998 | 0.1348 |
|
1442 |
+
| 0.6625 | 999 | 0.1507 |
|
1443 |
+
| 0.6631 | 1000 | 0.1366 |
|
1444 |
+
|
1445 |
+
</details>
|
1446 |
+
|
1447 |
+
### Framework Versions
|
1448 |
+
- Python: 3.10.12
|
1449 |
+
- Sentence Transformers: 3.2.1
|
1450 |
+
- Transformers: 4.44.2
|
1451 |
+
- PyTorch: 2.3.1+cu121
|
1452 |
+
- Accelerate: 1.1.1
|
1453 |
+
- Datasets: 2.21.0
|
1454 |
+
- Tokenizers: 0.19.1
|
1455 |
+
|
1456 |
+
## Citation
|
1457 |
+
|
1458 |
+
### BibTeX
|
1459 |
+
|
1460 |
+
#### Sentence Transformers
|
1461 |
+
```bibtex
|
1462 |
+
@inproceedings{reimers-2019-sentence-bert,
|
1463 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
1464 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
1465 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
1466 |
+
month = "11",
|
1467 |
+
year = "2019",
|
1468 |
+
publisher = "Association for Computational Linguistics",
|
1469 |
+
url = "https://arxiv.org/abs/1908.10084",
|
1470 |
+
}
|
1471 |
+
```
|
1472 |
+
|
1473 |
+
#### MultipleNegativesRankingLoss
|
1474 |
+
```bibtex
|
1475 |
+
@misc{henderson2017efficient,
|
1476 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
1477 |
+
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},
|
1478 |
+
year={2017},
|
1479 |
+
eprint={1705.00652},
|
1480 |
+
archivePrefix={arXiv},
|
1481 |
+
primaryClass={cs.CL}
|
1482 |
+
}
|
1483 |
+
```
|
1484 |
+
|
1485 |
+
<!--
|
1486 |
+
## Glossary
|
1487 |
+
|
1488 |
+
*Clearly define terms in order to be accessible across audiences.*
|
1489 |
+
-->
|
1490 |
+
|
1491 |
+
<!--
|
1492 |
+
## Model Card Authors
|
1493 |
+
|
1494 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
1495 |
+
-->
|
1496 |
+
|
1497 |
+
<!--
|
1498 |
+
## Model Card Contact
|
1499 |
+
|
1500 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
1501 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "models/gte--neg-v0-bs320-5e-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:c0e13bbc850fd5575e4d2e3a6087596e3da834c50b63995c242b87f82b7dbf99
|
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 |
+
}
|