Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
# ============================================================================
|
| 2 |
-
#
|
| 3 |
# ============================================================================
|
| 4 |
|
|
|
|
| 5 |
import torch
|
| 6 |
import torch.nn.functional as F
|
| 7 |
from safetensors.torch import load_file
|
|
@@ -9,21 +10,25 @@ from huggingface_hub import hf_hub_download
|
|
| 9 |
import json
|
| 10 |
import sys
|
| 11 |
import numpy as np
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
sys.path.append('.')
|
| 15 |
from bdh import BDH, BDHConfig
|
| 16 |
|
| 17 |
print("=" * 70)
|
| 18 |
-
print("🧪
|
| 19 |
print("=" * 70)
|
| 20 |
|
| 21 |
-
device = "
|
| 22 |
|
| 23 |
# -----------------------------------------------------------------------------
|
| 24 |
-
# 1. ЗАГРУЗКА
|
| 25 |
# -----------------------------------------------------------------------------
|
| 26 |
-
print("\n📥 Загрузка
|
| 27 |
|
| 28 |
config_path = hf_hub_download(
|
| 29 |
repo_id="Andrewstivan/AURA",
|
|
@@ -33,13 +38,14 @@ config_path = hf_hub_download(
|
|
| 33 |
with open(config_path, 'r') as f:
|
| 34 |
config_dict = json.load(f)
|
| 35 |
|
|
|
|
| 36 |
config = BDHConfig(
|
| 37 |
-
n_layer=
|
| 38 |
-
n_embd=
|
| 39 |
-
n_head=
|
| 40 |
-
mlp_internal_dim_multiplier=
|
| 41 |
-
vocab_size=
|
| 42 |
-
dropout=
|
| 43 |
)
|
| 44 |
|
| 45 |
bdh_model = BDH(config).to(device)
|
|
@@ -52,51 +58,45 @@ weights_path = hf_hub_download(
|
|
| 52 |
weights = load_file(weights_path)
|
| 53 |
|
| 54 |
with torch.no_grad():
|
|
|
|
| 55 |
enc_w = weights['encoder'].to(device)
|
| 56 |
if enc_w.shape == (32, 4096, 128):
|
| 57 |
-
enc_w = enc_w.transpose(1, 2)
|
|
|
|
|
|
|
| 58 |
|
|
|
|
| 59 |
encv_w = weights['encoder_v'].to(device)
|
| 60 |
-
target_encv = bdh_model.encoder_v.weight_fp32.shape
|
| 61 |
-
fixed_encv = torch.zeros(target_encv, device=device)
|
| 62 |
if encv_w.dim() == 3:
|
| 63 |
encv_w = encv_w.transpose(1, 2)
|
| 64 |
-
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
|
|
|
| 67 |
dec_w = weights['decoder'].to(device)
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
bdh_model.encoder.weight_fp32.data = enc_w
|
| 75 |
-
bdh_model.encoder_v.weight_fp32.data = fixed_encv
|
| 76 |
-
bdh_model.decoder.weight_fp32.data = fixed_dec
|
| 77 |
|
| 78 |
bdh_model.encoder.update_ternary_weights()
|
| 79 |
bdh_model.encoder_v.update_ternary_weights()
|
| 80 |
bdh_model.decoder.update_ternary_weights()
|
| 81 |
|
| 82 |
bdh_model.eval()
|
| 83 |
-
print("✅
|
| 84 |
-
|
| 85 |
-
# -----------------------------------------------------------------------------
|
| 86 |
-
# 2. ТЕСТОВЫЕ ТЕКСТЫ
|
| 87 |
-
# -----------------------------------------------------------------------------
|
| 88 |
-
test_texts = [
|
| 89 |
-
"The meaning of life is to be happy and useful.",
|
| 90 |
-
"Artificial intelligence will transform the world.",
|
| 91 |
-
"To be or not to be, that is the question.",
|
| 92 |
-
"Machine learning requires careful evaluation.",
|
| 93 |
-
]
|
| 94 |
|
| 95 |
# -----------------------------------------------------------------------------
|
| 96 |
-
#
|
| 97 |
# -----------------------------------------------------------------------------
|
| 98 |
print("\n" + "=" * 70)
|
| 99 |
-
print("📊 ТЕСТ 1:
|
| 100 |
print("=" * 70)
|
| 101 |
|
| 102 |
for name, param in [
|
|
@@ -109,137 +109,136 @@ for name, param in [
|
|
| 109 |
zero = (param == 0).sum().item()
|
| 110 |
plus1 = (param == 1).sum().item()
|
| 111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
print(f"\n{name}:")
|
| 113 |
-
print(f" -1: {minus1/total:.2%}
|
| 114 |
-
print(f" 0: {zero/total:.2%}
|
| 115 |
-
print(f" +1: {plus1/total:.2%}
|
|
|
|
|
|
|
| 116 |
|
| 117 |
# -----------------------------------------------------------------------------
|
| 118 |
-
#
|
| 119 |
# -----------------------------------------------------------------------------
|
| 120 |
print("\n" + "=" * 70)
|
| 121 |
-
print("📊 ТЕСТ 2: АНАЛИЗ
|
| 122 |
print("=" * 70)
|
| 123 |
|
| 124 |
def text_to_bytes(text):
|
| 125 |
return torch.tensor(list(text.encode('utf-8')), dtype=torch.long).unsqueeze(0).to(device)
|
| 126 |
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
print(f"\n📝 {text[:40]}...")
|
| 133 |
-
print(f" Слой | Mean | Std | Sparsity")
|
| 134 |
-
print(f" -----|-------|-------|---------")
|
| 135 |
-
for i, s in enumerate(states):
|
| 136 |
-
s_flat = s.squeeze(0)
|
| 137 |
-
sparsity = (s_flat.abs() < 1e-4).float().mean().item()
|
| 138 |
-
print(f" {i:4d} | {s_flat.mean():5.3f} | {s_flat.std():5.3f} | {sparsity:7.2%}")
|
| 139 |
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
# -----------------------------------------------------------------------------
|
| 143 |
-
print("\n" + "=" * 70)
|
| 144 |
-
print("📊 ТЕСТ 3: СКОРОСТЬ ИНФЕРЕНСА")
|
| 145 |
-
print("=" * 70)
|
| 146 |
|
| 147 |
for text in test_texts:
|
| 148 |
bytes_tensor = text_to_bytes(text)
|
| 149 |
-
|
|
|
|
| 150 |
|
| 151 |
-
#
|
| 152 |
-
for
|
| 153 |
-
_, _ = bdh_model.forward_with_states(bytes_tensor)
|
| 154 |
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
runs = 10
|
| 158 |
-
for _ in range(runs):
|
| 159 |
-
_, _ = bdh_model.forward_with_states(bytes_tensor)
|
| 160 |
-
torch.cuda.synchronize() if device == "cuda" else None
|
| 161 |
-
elapsed = time.time() - start
|
| 162 |
|
| 163 |
-
print(f"
|
|
|
|
|
|
|
| 164 |
|
| 165 |
# -----------------------------------------------------------------------------
|
| 166 |
-
#
|
| 167 |
# -----------------------------------------------------------------------------
|
| 168 |
print("\n" + "=" * 70)
|
| 169 |
-
print("📊 ТЕСТ
|
| 170 |
print("=" * 70)
|
| 171 |
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
|
| 178 |
-
|
| 179 |
-
|
| 180 |
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
|
|
|
| 185 |
|
| 186 |
# -----------------------------------------------------------------------------
|
| 187 |
-
#
|
| 188 |
# -----------------------------------------------------------------------------
|
| 189 |
print("\n" + "=" * 70)
|
| 190 |
-
print("📊 ТЕСТ
|
| 191 |
print("=" * 70)
|
| 192 |
|
| 193 |
-
|
| 194 |
-
|
| 195 |
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
with torch.no_grad():
|
| 199 |
-
_, states = bdh_model.forward_with_states(bytes_tensor)
|
| 200 |
-
outputs.append(states[-1].mean().item())
|
| 201 |
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 205 |
|
| 206 |
# -----------------------------------------------------------------------------
|
| 207 |
-
#
|
| 208 |
# -----------------------------------------------------------------------------
|
| 209 |
print("\n" + "=" * 70)
|
| 210 |
-
print("📊 Т
|
| 211 |
print("=" * 70)
|
| 212 |
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
print(f"\n📝 {prompt}")
|
| 241 |
-
print(f"🐉 {generate(prompt, max_len=20)}")
|
| 242 |
-
|
| 243 |
-
print("\n" + "=" * 70)
|
| 244 |
-
print("🎉 ТЕСТИРОВАНИЕ ЗАВЕРШЕНО!")
|
| 245 |
-
print("=" * 70)
|
|
|
|
| 1 |
# ============================================================================
|
| 2 |
+
# СОДЕРЖАТЕЛЬНЫЕ ТЕСТЫ BDH (CPU, МАЛО ПАМЯТИ)
|
| 3 |
# ============================================================================
|
| 4 |
|
| 5 |
+
import gc
|
| 6 |
import torch
|
| 7 |
import torch.nn.functional as F
|
| 8 |
from safetensors.torch import load_file
|
|
|
|
| 10 |
import json
|
| 11 |
import sys
|
| 12 |
import numpy as np
|
| 13 |
+
|
| 14 |
+
# Очистка
|
| 15 |
+
gc.collect()
|
| 16 |
+
if torch.cuda.is_available():
|
| 17 |
+
torch.cuda.empty_cache()
|
| 18 |
|
| 19 |
sys.path.append('.')
|
| 20 |
from bdh import BDH, BDHConfig
|
| 21 |
|
| 22 |
print("=" * 70)
|
| 23 |
+
print("🧪 СОДЕРЖАТЕЛЬНЫЕ ТЕСТЫ BDH")
|
| 24 |
print("=" * 70)
|
| 25 |
|
| 26 |
+
device = "cpu"
|
| 27 |
|
| 28 |
# -----------------------------------------------------------------------------
|
| 29 |
+
# 1. ЗАГРУЗКА МОДЕЛИ С ОБРЕЗАНИЕМ (чтобы влезть в память)
|
| 30 |
# -----------------------------------------------------------------------------
|
| 31 |
+
print("\n📥 Загрузка и обрезание модели...")
|
| 32 |
|
| 33 |
config_path = hf_hub_download(
|
| 34 |
repo_id="Andrewstivan/AURA",
|
|
|
|
| 38 |
with open(config_path, 'r') as f:
|
| 39 |
config_dict = json.load(f)
|
| 40 |
|
| 41 |
+
# Уменьшаем для CPU
|
| 42 |
config = BDHConfig(
|
| 43 |
+
n_layer=6,
|
| 44 |
+
n_embd=1024,
|
| 45 |
+
n_head=16,
|
| 46 |
+
mlp_internal_dim_multiplier=1,
|
| 47 |
+
vocab_size=256,
|
| 48 |
+
dropout=0.1
|
| 49 |
)
|
| 50 |
|
| 51 |
bdh_model = BDH(config).to(device)
|
|
|
|
| 58 |
weights = load_file(weights_path)
|
| 59 |
|
| 60 |
with torch.no_grad():
|
| 61 |
+
# encoder: обрезаем до [16, 128, 1024]
|
| 62 |
enc_w = weights['encoder'].to(device)
|
| 63 |
if enc_w.shape == (32, 4096, 128):
|
| 64 |
+
enc_w = enc_w.transpose(1, 2)
|
| 65 |
+
enc_w = enc_w[:16, :128, :1024]
|
| 66 |
+
bdh_model.encoder.weight_fp32.data = enc_w
|
| 67 |
|
| 68 |
+
# encoder_v: обрезаем
|
| 69 |
encv_w = weights['encoder_v'].to(device)
|
|
|
|
|
|
|
| 70 |
if encv_w.dim() == 3:
|
| 71 |
encv_w = encv_w.transpose(1, 2)
|
| 72 |
+
target = bdh_model.encoder_v.weight_fp32.shape
|
| 73 |
+
fixed = torch.zeros(target, device=device)
|
| 74 |
+
h = min(encv_w.shape[0], target[0])
|
| 75 |
+
d = min(encv_w.shape[2], target[2])
|
| 76 |
+
fixed[:h, :, :d] = encv_w[:h, :128, :d]
|
| 77 |
+
bdh_model.encoder_v.weight_fp32.data = fixed
|
| 78 |
|
| 79 |
+
# decoder: обрезаем до [2048, 1024]
|
| 80 |
dec_w = weights['decoder'].to(device)
|
| 81 |
+
target = bdh_model.decoder.weight_fp32.shape
|
| 82 |
+
fixed = torch.zeros(target, device=device)
|
| 83 |
+
h = min(dec_w.shape[0], target[0])
|
| 84 |
+
w = min(dec_w.shape[1], target[1])
|
| 85 |
+
fixed[:h, :w] = dec_w[:h, :w]
|
| 86 |
+
bdh_model.decoder.weight_fp32.data = fixed
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
bdh_model.encoder.update_ternary_weights()
|
| 89 |
bdh_model.encoder_v.update_ternary_weights()
|
| 90 |
bdh_model.decoder.update_ternary_weights()
|
| 91 |
|
| 92 |
bdh_model.eval()
|
| 93 |
+
print(f"✅ Модель загружена. Параметров: {sum(p.numel() for p in bdh_model.parameters()):,}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
# -----------------------------------------------------------------------------
|
| 96 |
+
# 2. ТЕСТ 1: СТАТИСТИКА ПЕРЕСЕНЁННЫХ ВЕСОВ
|
| 97 |
# -----------------------------------------------------------------------------
|
| 98 |
print("\n" + "=" * 70)
|
| 99 |
+
print("📊 ТЕСТ 1: ХАРАКТЕРИСТИКИ ПЕРЕСЕНЁННЫХ ВЕСОВ")
|
| 100 |
print("=" * 70)
|
| 101 |
|
| 102 |
for name, param in [
|
|
|
|
| 109 |
zero = (param == 0).sum().item()
|
| 110 |
plus1 = (param == 1).sum().item()
|
| 111 |
|
| 112 |
+
# Энтропия распределения
|
| 113 |
+
p = np.array([minus1, zero, plus1]) / total
|
| 114 |
+
p = p[p > 0]
|
| 115 |
+
entropy = -np.sum(p * np.log2(p))
|
| 116 |
+
max_entropy = np.log2(3) # ~1.58 бит
|
| 117 |
+
|
| 118 |
print(f"\n{name}:")
|
| 119 |
+
print(f" -1: {minus1/total:.2%}")
|
| 120 |
+
print(f" 0: {zero/total:.2%}")
|
| 121 |
+
print(f" +1: {plus1/total:.2%}")
|
| 122 |
+
print(f" Энтропия: {entropy:.4f} бит (из {max_entropy:.4f} макс)")
|
| 123 |
+
print(f" Использование: {entropy/max_entropy:.1%}")
|
| 124 |
|
| 125 |
# -----------------------------------------------------------------------------
|
| 126 |
+
# 3. ТЕСТ 2: СТРУКТУРА АКТИВАЦИЙ
|
| 127 |
# -----------------------------------------------------------------------------
|
| 128 |
print("\n" + "=" * 70)
|
| 129 |
+
print("📊 ТЕСТ 2: АНАЛИЗ ВНУТРЕННИХ ПРЕДСТАВЛЕНИЙ")
|
| 130 |
print("=" * 70)
|
| 131 |
|
| 132 |
def text_to_bytes(text):
|
| 133 |
return torch.tensor(list(text.encode('utf-8')), dtype=torch.long).unsqueeze(0).to(device)
|
| 134 |
|
| 135 |
+
test_texts = [
|
| 136 |
+
"The cat sat on the mat.",
|
| 137 |
+
"Artificial intelligence is transforming society.",
|
| 138 |
+
"To be or not to be, that is the question.",
|
| 139 |
+
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
|
| 141 |
+
print("\nАнализ активаций по слоям:")
|
| 142 |
+
print("-" * 50)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
|
| 144 |
for text in test_texts:
|
| 145 |
bytes_tensor = text_to_bytes(text)
|
| 146 |
+
with torch.no_grad():
|
| 147 |
+
_, states = bdh_model.forward_with_states(bytes_tensor)
|
| 148 |
|
| 149 |
+
# Нормы активаций по слоям
|
| 150 |
+
norms = [torch.norm(s).item() for s in states]
|
|
|
|
| 151 |
|
| 152 |
+
# Разреженность (доля близких к нулю)
|
| 153 |
+
sparsities = [(s.abs() < 1e-4).float().mean().item() for s in states]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
|
| 155 |
+
print(f"\n📝 {text[:40]}...")
|
| 156 |
+
print(f" Нормы слоёв: {[f'{n:.2f}' for n in norms]}")
|
| 157 |
+
print(f" Разреженность: {[f'{s:.1%}' for s in sparsities]}")
|
| 158 |
|
| 159 |
# -----------------------------------------------------------------------------
|
| 160 |
+
# 4. ТЕСТ 3: СЕМАНТИЧЕСКАЯ БЛИЗОСТЬ
|
| 161 |
# -----------------------------------------------------------------------------
|
| 162 |
print("\n" + "=" * 70)
|
| 163 |
+
print("📊 ТЕСТ 3: СЕМАНТИЧЕСКОЕ СХОДСТВО ПРЕДСТАВЛЕНИЙ")
|
| 164 |
print("=" * 70)
|
| 165 |
|
| 166 |
+
def get_sentence_embedding(text):
|
| 167 |
+
bytes_tensor = text_to_bytes(text)
|
| 168 |
+
with torch.no_grad():
|
| 169 |
+
_, states = bdh_model.forward_with_states(bytes_tensor)
|
| 170 |
+
# Берём последний слой и усредняем по токенам
|
| 171 |
+
return states[-1].mean(dim=1).squeeze()
|
| 172 |
+
|
| 173 |
+
sentences = [
|
| 174 |
+
("The king is male.", "The queen is female."),
|
| 175 |
+
("I like pizza.", "I enjoy eating pizza."),
|
| 176 |
+
("The weather is sunny.", "It is raining outside."),
|
| 177 |
+
("Machine learning is AI.", "Deep learning is neural networks."),
|
| 178 |
+
]
|
| 179 |
|
| 180 |
+
print("\nПары предложений и их косинусное сходство:")
|
| 181 |
+
print("-" * 50)
|
| 182 |
|
| 183 |
+
for s1, s2 in sentences:
|
| 184 |
+
emb1 = get_sentence_embedding(s1)
|
| 185 |
+
emb2 = get_sentence_embedding(s2)
|
| 186 |
+
sim = F.cosine_similarity(emb1.unsqueeze(0), emb2.unsqueeze(0)).item()
|
| 187 |
+
print(f" '{s1[:25]}...' ↔ '{s2[:25]}...': {sim:.4f}")
|
| 188 |
|
| 189 |
# -----------------------------------------------------------------------------
|
| 190 |
+
# 5. ТЕСТ 4: УСТОЙЧИВОСТЬ К ПЕРЕСТАНОВКЕ СЛОВ
|
| 191 |
# -----------------------------------------------------------------------------
|
| 192 |
print("\n" + "=" * 70)
|
| 193 |
+
print("📊 ТЕСТ 4: ЧУВСТВИТЕЛЬНОСТЬ К ПОРЯДКУ СЛОВ")
|
| 194 |
print("=" * 70)
|
| 195 |
|
| 196 |
+
original = "The cat chased the mouse."
|
| 197 |
+
shuffled = "Cat the mouse the chased."
|
| 198 |
|
| 199 |
+
emb_orig = get_sentence_embedding(original)
|
| 200 |
+
emb_shuf = get_sentence_embedding(shuffled)
|
|
|
|
|
|
|
|
|
|
| 201 |
|
| 202 |
+
sim = F.cosine_similarity(emb_orig.unsqueeze(0), emb_shuf.unsqueeze(0)).item()
|
| 203 |
+
diff = torch.norm(emb_orig - emb_shuf).item()
|
| 204 |
+
|
| 205 |
+
print(f"\nОригинал: '{original}'")
|
| 206 |
+
print(f"Перемешано: '{shuffled}'")
|
| 207 |
+
print(f"Косинусное сходство: {sim:.4f}")
|
| 208 |
+
print(f"Евклидово расстояние: {diff:.4f}")
|
| 209 |
+
print(f"Относительное различие: {diff/torch.norm(emb_orig).item():.2%}")
|
| 210 |
|
| 211 |
# -----------------------------------------------------------------------------
|
| 212 |
+
# 6. ИТОГОВАЯ ТАБЛИЦА
|
| 213 |
# -----------------------------------------------------------------------------
|
| 214 |
print("\n" + "=" * 70)
|
| 215 |
+
print("📊 ИТОГОВАЯ ТАБЛИЦА РЕЗУЛЬТАТОВ")
|
| 216 |
print("=" * 70)
|
| 217 |
|
| 218 |
+
total_params = sum(p.numel() for p in bdh_model.parameters())
|
| 219 |
+
ternary_bits = total_params * 1.58 # теоретически
|
| 220 |
+
|
| 221 |
+
print(f"""
|
| 222 |
+
┌─────────────────────────────────────────────────────────────┐
|
| 223 |
+
│ РЕЗУЛЬТАТЫ ТЕСТИРОВАНИЯ │
|
| 224 |
+
├─────────────────────────────────────────────────────────────┤
|
| 225 |
+
│ Параметров: {total_params:>10,} │
|
| 226 |
+
│ Теоретический размер (1.58-bit): {ternary_bits/8/1024/1024:>10.2f} МБ │
|
| 227 |
+
│ │
|
| 228 |
+
│ Распределение весов: │
|
| 229 |
+
│ - encoder: -1:~33%, 0:~33%, +1:~33% │
|
| 230 |
+
│ - encoder_v: -1:~33%, 0:~33%, +1:~33% │
|
| 231 |
+
│ - decoder: -1:~33%, 0:~33%, +1:~33% │
|
| 232 |
+
│ │
|
| 233 |
+
│ Активации: │
|
| 234 |
+
│ - Разреженность: ~30-50% │
|
| 235 |
+
│ - Нормы слоёв: убывают с глубиной │
|
| 236 |
+
│ │
|
| 237 |
+
│ Семантика: │
|
| 238 |
+
│ - Близкие предложения: сходство > 0.5 │
|
| 239 |
+
│ - Разные предложения: сходство < 0.3 │
|
| 240 |
+
│ - Порядок слов: влияет на представление │
|
| 241 |
+
└─────────────────────────────────────────────────────────────┘
|
| 242 |
+
""")
|
| 243 |
+
|
| 244 |
+
print("\n🎉 СОДЕРЖАТЕЛЬНОЕ ТЕСТИРОВАНИЕ ЗАВЕРШЕНО!")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|