|
AI Qwen Fine Tuning
Тренируем локальный ИИ для анализа таблиц маршрутизации.
Dataset Generate
Для тренировки компактной модели ИИ Qwen на локальном сервере нужно 2-3 тысячи специально подготовленных JSON примеров. Синтетическая генерация: Используйте LLM (DeepSeek-R1, Qwen 2.5 72B) для генерации разнообразных примеров таблиц маршрутизации с различными ошибками. Генерация должна быть целевой: вы создаете запросы, в которых указываете, какие ошибки должна содержать таблица (петли, неверная суммаризация).
Структуризация: Используйте инструменты вроде promptwright для масштабной генерации на основе графа тем. Баланс: Обеспечьте разнообразие примеров: "здоровые" таблицы, таблицы с петлями, ошибками суммаризации, проблемами next-hop и т.д. Использование LoRA позволяет эффективно дообучать 7B-модель с ограниченными ресурсами.
Datasets >>>>
Если интересно, то: arrayphotocintrol - Вы же понимаете, что это такое
Dataset Generate
Сгенерируем 20 примеров для обучения модели. Создадим с помощью ИИ сбалансированный датасет с различными сценариями, включая здоровые таблицы и различные типы ошибок.
JSON Dataset
JSON
[
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide
step-by-step reasoning."
},
{
"role": "user",
"content": "Routing table:\nS 10.1.1.0/24 [1/0] via 192.168.1.1\nS 10.1.2.0/24 [1/0] via 192.168.1.1\nS 10.1.3.0/24 [1/0]
via 192.168.1.1\nO 10.2.0.0/16 [110/2] via 10.0.0.2\nC 192.168.1.0/24 is directly connected, GigabitEthernet0/0\n\n
Question: Identify any routing issues in this table."
},
{
"role": "assistant",
"content": "\n1. Examining the routing table for summary issues: the three static routes (10.1.1.0/24, 10.1.2.0/24,
10.1.3.0/24) could be summarized into a single route (10.1.0.0/22).\n2. No duplicate routes with equal metrics are present,
so no routing loops.\n3. All next-hop addresses appear valid based on the directly connected network.\n4. There are no AD
conflicts visible.\n\n\nIssue found: Poor summarization. Three consecutive /24 static routes should be
summarized as 10.1.0.0/22 to reduce routing table size and improve convergence time.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide
step-by-step reasoning."
},
{
"role": "user",
"content": "Routing table:\nS 10.1.1.0/24 [1/0] via 192.168.1.1\nS 10.1.1.0/24 [1/0] via 192.168.2.1\nO
10.1.1.0/24 [110/2] via 10.0.0.2\n\nQuestion: Does this routing table contain a routing loop?"
},
{
"role": "assistant",
"content": "\n1. I see three entries for the same network 10.1.1.0/24.\n2. Two static routes have the same metric
[1/0] and Administrative Distance (AD=1).\n3. The OSPF route has AD=110, which is higher than static routes.\n4. Equal-cost
static routes via different next-hops can create a routing loop if routing is not properly configured.\n5.
Traffic destined to 10.1.1.0/24 could bounce between 192.168.1.1 and 192.168.2.1.\n\n\nYES,
potential routing loop exists. Two static routes to 10.1.1.0/24 with equal metrics via different next-hops
(192.168.1.1 and 192.168.2.1) create a loop risk. The OSPF route is inactive as static routes have better
AD (1 vs 110).\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide
step-by-step reasoning."
},
{
"role": "user",
"content": "Routing table:\nC 10.0.0.0/8 is directly connected, GigabitEthernet0/0\nC 10.1.0.0/16 is
directly connected, GigabitEthernet0/1\nS 0.0.0.0/0 [1/0] via 10.0.0.1\n\nQuestion: Identify any
routing issues."
},
{
"role": "assistant",
"content": "\n1. Checking for overlapping networks: 10.1.0.0/16 is completely within 10.0.0.0/8.\n2. This
creates a subnet conflict because 10.1.0.0/16 overlaps with the larger /8 network.\n3. The default route points
to 10.0.0.1, which may be problematic if 10.0.0.1 is not reachable.\n4. No duplicate routes present, so no loops.\n
\n\nERROR: Network overlap detected. 10.1.0.0/16 is a subnet of 10.0.0.0/8, creating
ambiguous routing for traffic to 10.1.x.x. This will cause routing inconsistencies and potential
blackholing.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide
step-by-step reasoning."
},
{
"role": "user",
"content": "Routing table:\nO 192.168.1.0/24 [110/2] via 10.0.0.2, 00:01:23, GigabitEthernet0/0\nO
192.168.1.0/24 [110/2] via 10.0.0.3, 00:01:23, GigabitEthernet0/1\nO 192.168.1.0/24 [110/5] via
10.0.0.4, 00:00:45, GigabitEthernet0/2\n\n Question: Identify any routing issues."
},
{
"role": "assistant",
"content": "\n1. Three OSPF routes to the same network 192.168.1.0/24.\n2. Two routes have equal metric (2)
and equal age (00:01:23), indicating proper ECMP.\n3. The third route has different metric (5) and newer age (00:00:45),
suggesting convergence lag.\n4. This is typically a transient state during network convergence.\n\n
\nWARNING: Asymmetric routing and convergence issue detected. Two paths have equal cost (metric 2)
while a third path is converging with metric 5 and 3-second younger age. This indicates the network is still converging
or there is a topology change.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide
step-by-step reasoning."
},
{
"role": "user",
"content": "Routing table:\nS 172.16.1.0/24 [1/0] via 10.0.0.1\nS 172.16.2.0/24 [1/0] via 10.0.0.1\nS
172.16.3.0/24 [1/0] via 10.0.0.1\nS 172.16.0.0/20 [1/0] via 10.0.0.2\n\nQuestion: Identify any routing issues."
},
{
"role": "assistant",
"content": "\n1. Four static routes to 172.16.x.x networks.\n2. The summary route 172.16.0.0/20 covers
172.16.0.0-172.16.15.255, which includes the three specific /24 routes.\n3. More specific routes are preferred over
less specific routes with different next-hops.\n4. This creates a routing inconsistency where some traffic will
go to 10.0.0.1 and other to 10.0.0.2.\n\n\nISSUE: Summary route inconsistency.
The summary route (172.16.0.0/20) points to 10.0.0.2 while more specific routes point to 10.0.0.1. This can cause
asymmetric routing and policy-based routing conflicts.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide
step-by-step reasoning."
},
{
"role": "user",
"content": "Routing table:\nB 10.1.0.0/16 [20/0] via 192.168.1.1\nB 10.1.0.0/16 [200/0] via 192.168.2.1\nS
10.1.0.0/16 [1/0] via 192.168.3.1\n\nQuestion: Identify any routing issues."
},
{
"role": "assistant",
"content": "\n1. Multiple routing protocols learning the same network: BGP (two entries) and Static.\n2.
Static route has AD=1, BGP has AD=20 or 200.\n3. Static route with AD 1 will be preferred over BGP routes
regardless of BGP attributes.\n4. Two BGP routes with different ADs (20 and 200) indicate different BGP
implementations or route types.\n\n\nAD CONFLICT DETECTED: Static route (AD=1)
will override both BGP routes (AD=20 and AD=200). This can cause routing blackholing or suboptimal routing if
BGP routes are intended to be used. Consider reducing static AD or increasing BGP AD.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide step-by-step
reasoning."
},
{
"role": "user",
"content": "Routing table:\nS 10.1.1.0/24 [1/0] via 192.168.1.254\nO 10.1.2.0/24 [110/2] via 10.0.0.2\nC
10.1.3.0/24 is directly connected, GigabitEthernet0/0\nC 10.1.4.0/24 is directly connected, GigabitEthernet0/1\nS
0.0.0.0/0 [1/0] via 192.168.1.254\n\nQuestion: Analyze this routing table for issues."
},
{
"role": "assistant",
"content": "\n1. Checking for reachability: 192.168.1.254 is not directly connected.\n2. No ARP
entry or connected route to 192.168.1.254 exists, making next-hop unreachable.\n3. This makes both static
routes (10.1.1.0/24 and 0.0.0.0/0) invalid.\n4. No overlapping networks detected.\n5. No duplicate routes, so
no loops.\n\n\nCRITICAL ERROR: Invalid next-hop 192.168.1.254 in static routes.
Neither static route (10.1.1.0/24 nor default route) will work because the next-hop is unreachable. Verify
reachability or use interface-based static routes.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide
step-by-step reasoning."
},
{
"role": "user",
"content": "Routing table:\nO 10.1.0.0/16 [110/2] via 10.0.0.2\nO 10.1.1.0/24 [110/3] via 10.0.0.3\nS
10.1.1.0/24 [1/0] via 10.0.0.4\n\nQuestion: Identify any routing issues."
},
{
"role": "assistant",
"content": "\n1. 10.1.1.0/24 is a subnet of 10.1.0.0/16.\n2. Two routes to 10.1.1.0/24 exist: OSPF
(AD=110, metric 3) and Static (AD=1).\n3. Static route (AD=1) will be preferred over both OSPF routes.\n4.
This means traffic to 10.1.1.0/24 goes to 10.0.0.4 while 10.1.x.x other networks go via 10.0.0.2.\n5. The OSPF route to
10.1.1.0/24 via 10.0.0.3 is redundant as static route overrides it.\n\n\nISSUES DETECTED: \n1.
AD conflict: Static route (AD=1) overrides OSPF route (AD=110) to 10.1.1.0/24.\n2. Overlapping OSPF routes:
10.1.1.0/24 is within 10.1.0.0/16, causing OSPF suboptimal routing for /24 traffic.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide
step-by-step reasoning."
},
{
"role": "user",
"content": "Routing table:\nS 10.1.1.0/24 [1/0] via 10.0.0.1\nS 10.1.1.0/24 [1/0] via 10.0.0.2\nS
10.1.1.0/24 [1/0] via 10.0.0.3\n\nQuestion: Does this routing table contain a routing loop?"
},
{
"role": "assistant",
"content": "\n1. Three static routes to the exact same network (10.1.1.0/24).\n2. All have identical AD (1)
and metric (0).\n3. This is an equal-cost multipath (ECMP) configuration with 3 paths.\n4. ECMP with static
routes is valid but requires proper load-balancing configuration.\n5. Without proper configuration, this can cause
routing loops if the next-hop routers have routes back to each other.\n\n\nPOTENTIAL
LOOP WARNING: Three equal-cost static routes to 10.1.1.0/24 via different next-hops. While ECMP is valid, this
configuration has high risk of routing loops if the next-hop routers are not properly configured. Check that routing
between 10.0.0.1, 10.0.0.2, and 10.0.0.3 is not creating circular paths.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide step-by-step
reasoning."
},
{
"role": "user",
"content": "Routing table:\nC 192.168.1.0/24 is directly connected, GigabitEthernet0/0\nC 192.168.2.0/24
is directly connected, GigabitEthernet0/1\nO 192.168.0.0/20 [110/2] via 10.0.0.1\n\nQuestion: Identify any
routing issues."
},
{
"role": "assistant",
"content": "\n1. Connected routes: 192.168.1.0/24 and 192.168.2.0/24.\n2. OSPF route:
192.168.0.0/20 covers 192.168.0.0-192.168.15.255.\n3. Both connected routes are within the OSPF summary
range.\n4. Connected routes (AD=0) will override OSPF route (AD=110) for specific /24 subnets.\n5. This is
normal behavior but indicates poor summarization design.\n\n\nSUMMARY ISSUE:
OSPF route 192.168.0.0/20 overlaps with connected routes 192.168.1.0/24 and 192.168.2.0/24. While connected
routes take precedence, this creates confusion in route propagation and can cause OSPF to advertise incorrect
information if not properly filtered.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide step-by-step
reasoning."
},
{
"role": "user",
"content": "Routing table:\nB 10.0.0.0/8 [20/0] via 192.168.1.1\nB 10.1.0.0/16 [20/0] via 192.168.2.1\nB
10.1.1.0/24 [20/0] via 192.168.3.1\n\nQuestion: Identify any routing issues."
},
{
"role": "assistant",
"content": "\n1. Three BGP routes with hierarchical subnetting: /8, /16, and /24.\n2. All have same
AD (20) and metric (0).\n3. More specific prefixes (10.1.1.0/24) are preferred over less specific prefixes.\n4.
This is BGP longest prefix match routing, which is valid but inefficient.\n5. No duplicate routes with equal metrics
to different next-hops, so no loops.\n\n\nEFFICIENCY ISSUE: BGP table contains overlapping
routes (10.1.1.0/24 is within 10.1.0.0/16 within 10.0.0.0/8). This indicates poor route aggregation in BGP advertisement.
Recommend summarizing to reduce BGP table size and improve convergence.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide step-by-step
reasoning."
},
{
"role": "user",
"content": "Routing table:\nS 10.1.1.0/24 [1/0] via 10.0.0.1\nS 10.1.2.0/24 [1/0] via 10.0.0.1\nS
10.1.3.0/24 [1/0] via 10.0.0.2\nS 10.1.4.0/24 [1/0] via 10.0.0.2\n\nQuestion: Analyze this routing table for issues."
},
{
"role": "assistant",
"content": "\n1. Four static routes to /24 networks in the 10.1.x.x range.\n2. 10.1.1.0/24 and 10.1.2.0/24
point to 10.0.0.1.\n3. 10.1.3.0/24 and 10.1.4.0/24 point to 10.0.0.2.\n4. This could be summarized into two routes:
10.1.0.0/22 via 10.0.0.1 and 10.1.4.0/22 via 10.0.0.2.\n5. No duplicate routes, no AD conflicts.\n\n
\nPOOR SUMMARIZATION: Four /24 static routes should be summarized. Recommended summary: \n-
10.1.0.0/22 via 10.0.0.1 (covers 10.1.0.0-10.1.3.255)\n- 10.1.4.0/22 via 10.0.0.2 (covers 10.1.4.0-10.1.7.255)\nThis
would reduce routing table size and improve performance.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide step-by-step
reasoning."
},
{
"role": "user",
"content": "Routing table:\nS 10.1.1.0/24 [1/0] via 10.0.0.1\nS 10.1.1.0/24 [1/0] via 10.0.0.1\nO
10.1.1.0/24 [110/2] via 10.0.0.2\n\nQuestion: Does this routing table contain any issues?"
},
{
"role": "assistant",
"content": "\n1. Two identical static routes to 10.1.1.0/24 via 10.0.0.1 - duplicate entry.\n2.
One OSPF route to same network via 10.0.0.2.\n3. Duplicate static route is redundant and wastes routing
table space.\n4. Static route (AD=1) overrides OSPF route (AD=110).\n5. No loop risk as both static routes
point to same next-hop.\n\n\nWARNINGS:\n1. Duplicate static route detected (same
network, same next-hop). Remove one entry.\n2. Static route overrides OSPF route to 10.1.1.0/24 - verify if
this is intentional.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide step-by-step
reasoning."
},
{
"role": "user",
"content": "Routing table:\nS 10.1.0.0/24 [1/0] via 192.168.1.1\nO 10.1.0.0/24 [110/2] via 192.168.1.2\nO
10.1.0.0/24 [110/3] via 192.168.1.3\n\nQuestion: Identify any routing issues."
},
{
"role": "assistant",
"content": "\n1. One static route and two OSPF routes to same network 10.1.0.0/24.\n2. Static
route has AD=1 and will be preferred.\n3. Two OSPF routes have different metrics (2 and 3), indicating different
path costs.\n4. Static route overrides both OSPF routes, making them backup routes.\n5. No equal-cost routes
to different next-hops, so no loops.\n\n\nAD CONFLICT: Static route (AD=1) overrides
OSPF routes (AD=110) to 10.1.0.0/24. While this is valid, the OSPF routes are now used only as backups,
and their metrics (2 vs 3) indicate suboptimal OSPF path calculation.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide step-by-step
reasoning."
},
{
"role": "user",
"content": "Routing table:\nO 10.0.0.0/8 [110/2] via 192.168.1.1\nO 10.0.0.0/8 [110/2] via 192.168.1.2\nS
10.0.0.0/8 [1/0] via 192.168.1.3\n\nQuestion: Identify any routing issues."
},
{
"role": "assistant",
"content": "\n1. Three routes to same network 10.0.0.0/8.\n2. Two OSPF equal-cost routes (ECMP)
via 192.168.1.1 and 192.168.1.2.\n3. Static route via 192.168.1.3 with AD=1.\n4. Static route will override both
OSPF routes, making them inactive.\n5. This breaks ECMP for OSPF routes as static route takes precedence.\n
\n\nECMP BROKEN: Static route (AD=1) to 10.0.0.0/8 via 192.168.1.3 overrides OSPF
ECMP routes (AD=110). This prevents load-balancing across two OSPF paths. Consider removing static route
or using higher AD if ECMP is desired.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide step-by-step
reasoning."
},
{
"role": "user",
"content": "Routing table:\nC 10.1.1.0/24 is directly connected, GigabitEthernet0/0\nC 10.1.2.0/24 is directly
connected, GigabitEthernet0/1\nS 10.1.0.0/16 [1/0] via 192.168.1.1\nS 10.1.0.0/16 [1/0] via 192.168.1.2\n\n
Question: Analyze this routing table for issues."
},
{
"role": "assistant",
"content": "\n1. Connected routes to 10.1.1.0/24 and 10.1.2.0/24.\n2. Static summary route 10.1.0.0/16
with two ECMP paths via 192.168.1.1 and 192.168.1.2.\n3. Connected routes (AD=0) override summary route for
specific /24 networks.\n4. ECMP static routes with equal AD and metric to different next-hops.\n5. This is valid
design - connected routes take precedence, static provides backup.\n\n\nVALID
CONFIGURATION with one observation: The static summary route 10.1.0.0/16 will be used for traffic to
10.1.x.x networks except 10.1.1.0/24 and 10.1.2.0/24, which are directly connected. This provides both local
connectivity and backup routing for other subnets.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide step-by-step
reasoning."
},
{
"role": "user",
"content": "Routing table:\nS 10.1.1.0/24 [1/0] via 10.0.0.1\nS 10.1.2.0/24 [1/0] via 10.0.0.1\nS
10.1.3.0/24 [1/0] via 10.0.0.2\nS 10.1.4.0/24 [1/0] via 10.0.0.2\nS 10.1.5.0/24 [1/0] via 10.0.0.3\nS
10.1.6.0/24 [1/0] via 10.0.0.3\n\nQuestion: Identify any routing issues."
},
{
"role": "assistant",
"content": "\n1. Six static routes organized in three groups of two /24 networks.\n2. Each
group points to different next-hop.\n3. Potential summarization opportunities: \n - 10.1.1.0/24 and
10.1.2.0/24 > 10.1.0.0/22 via 10.0.0.1\n - 10.1.3.0/24 and 10.1.4.0/24 > 10.1.4.0/22 via 10.0.0.2\n -
10.1.5.0/24 and 10.1.6.0/24 > 10.1.4.0/22 via 10.0.0.3 (but 10.1.5.0/24 already covered)\n4. Problem:
10.1.5.0/24 and 10.1.6.0/24 could be summarized as 10.1.4.0/22, but 10.1.4.0/24 overlaps with previous
group.\n5. Actually, better summary: 10.1.0.0/22 via 10.0.0.1, 10.1.4.0/22 via 10.0.0.2, 10.1.4.0/22 via
10.0.0.3 - but 10.1.4.0/22 overlaps!\n\n\nSUMMARIZATION ERROR: The /24
networks are poorly distributed across next-hops. Recommended summaries:\n- 10.1.0.0/22 via 10.0.0.1
(covers 10.1.1.0-10.1.2.255)\n- 10.1.4.0/22 via 10.0.0.2 (covers 10.1.3.0-10.1.4.255)\n- 10.1.4.0/22 via
10.0.0.3 (covers 10.1.5.0-10.1.6.255) - OVERLAPPING WITH PREVIOUS!\nThis indicates network
topology needs redesign to allow proper summarization without overlap.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide
step-by-step reasoning."
},
{
"role": "user",
"content": "Routing table:\nS 10.1.1.0/24 [1/0] via 10.0.0.1\nS 10.1.1.0/24 [5/0] via 10.0.0.2\nS
10.1.2.0/24 [1/0] via 10.0.0.1\nS 10.1.2.0/24 [5/0] via 10.0.0.2\n\nQuestion: Identify any routing issues."
},
{
"role": "assistant",
"content": "\n1. Two static routes to 10.1.1.0/24 with different metrics (1 and 5).\n2. Two
static routes to 10.1.2.0/24 with different metrics (1 and 5).\n3. Route with lower metric (1) is always
preferred, making metric 5 routes inactive backups.\n4. This is a valid static route backup design with
primary (metric 1) and backup (metric 5) paths.\n5. No duplicate routes with equal metrics, so no loops.\n
\n\nVALID REDUNDANT DESIGN: Two static routes with floating metrics (AD=1,
metric 1 vs AD=1, metric 5) provide primary and backup paths. The metric 5 routes will only be used if
metric 1 routes fail. This is proper static route floating metric design.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide
step-by-step reasoning."
},
{
"role": "user",
"content": "Routing table:\nS 10.1.1.0/24 [1/0] via 10.0.0.1\nS 10.1.2.0/24 [1/0] via 10.0.0.1\nS
10.1.3.0/24 [1/0] via 10.0.0.1\nS 10.1.0.0/16 [1/0] via 10.0.0.2\n\nQuestion: Identify any routing issues."
},
{
"role": "assistant",
"content": "\n1. Three specific static routes: 10.1.1.0/24, 10.1.2.0/24, 10.1.3.0/24 via 10.0.0.1.\n2.
One summary static route: 10.1.0.0/16 via 10.0.0.2.\n3. Specific routes are preferred over summary route for
10.1.1.0/24, 10.1.2.0/24, 10.1.3.0/24.\n4. Summary route covers all 10.1.x.x networks including the specific
ones.\n5. This causes inconsistent routing: 10.1.1.0/24 > 10.0.0.1, 10.1.4.0/24 > 10.0.0.2.\n\n
\nISSUE: Routing inconsistency - specific routes point to 10.0.0.1 while summary route points to
10.0.0.2. This can cause traffic for 10.1.1.0/24 to go to 10.0.0.1 while 10.1.4.0/24 goes to 10.0.0.2. Consider
summarizing all routes via same next-hop or redesign topology.\n"
}
]
},
{
"messages": [
{
"role": "system",
"content": "You are a network routing expert. Analyze the routing table, detect issues, and provide
step-by-step reasoning."
},
{
"role": "user",
"content": "Routing table:\nO 10.1.0.0/16 [110/2] via 10.0.0.1, 00:01:23, GigabitEthernet0/0\nO
10.1.0.0/16 [110/2] via 10.0.0.2, 00:01:20, GigabitEthernet0/1\nS 10.1.0.0/16 [1/0] via 10.0.0.3\n\nQuestion:
Identify any routing issues."
},
{
"role": "assistant",
"content": "\n1. Two OSPF equal-cost routes to 10.1.0.0/16 via 10.0.0.1 and 10.0.0.2.\n2.
One static route to same network via 10.0.0.3 with AD=1.\n3. OSPF routes have same metric (2) but slightly
different ages (00:01:23 vs 00:01:20).\n4. Static route will override both OSPF routes despite OSPF EC
LoRA, или Low-Rank Adaptation, — это прорывная методика в области machine learning (ML), предназначенная для эффективной дообучения (fine-tuning) огромных предварительно обученных моделей. Поскольку современные foundation models выросли до миллиардов параметров, вычислительные затраты на их переобучение для конкретных задач стали непомерно высокими для многих разработчиков. LoRA решает эту проблему, замораживая исходные model weights и внедряя в архитектуру небольшие обучаемые матрицы низкорангового разложения. Этот метод сокращает количество обучаемых параметров до 10 000 раз, значительно снижая требования к памяти и позволяя инженерам адаптировать мощные нейросети на обычном потребительском оборудовании, например, на одном GPU (Graphics Processing Unit).
Опыт работы >>>>
Prompts >>>>
ИИ Датасеты >>>>
AI Fine Tuning >>>>
Суть LoRA заключается в ее подходе к адаптации модели без погружения в подробности повторной тренировки всей модели. В отличие от традиционного дообучения, где каждый параметр подвергается изменению, LoRA выбирает более умный путь. Она замораживает предварительно обученные веса модели и вводит обучаемые матрицы ранговой декомпозиции в каждый слой архитектуры трансформера. Этот подход существенно снижает количество обучаемых параметров, обеспечивая более эффективный процесс адаптации.
Хотя LoRA является прорывом в снижении потребностей в хранении, она все еще требует мощного GPU для загрузки модели для обучения. Вот где появляется QLoRA, или квантованная LoRA, сочетая LoRA с квантованием для более умного подхода.
Обычно весовые параметры хранятся в 32-битовом формате (FP32), что означает, что каждый элемент матрицы занимает 32 бита места. Представьте, если бы мы могли сжать одну и ту же информацию всего в 8 или даже 4 бита. Это основная идея QLoRA. Квантование относится к процессу отображения непрерывных бесконечных значений на меньший набор дискретных конечных значений. В контексте LLM оно относится к процессу преобразования весов модели из более высоких типов данных в типы с более низкой точностью.
LoRA находит свое практическое применение в библиотеке Hugging Face Parameter Efficient Fine-Tuning (PEFT), упрощая ее использование. Для тех, кто хочет использовать QLoRA, она доступна через комбинацию библиотек bitsandbytes и PEFT. Кроме того, библиотека HuggingFace Transformer Reinforcement Learning (TRL) облегчает дообучение с встроенной поддержкой LoRA. Вместе эти три библиотеки предоставляют необходимый инструментарий для дообучения выбранной предварительно обученной модели, позволяя генерировать убедительные и связные описания продукта при указании конкретных инструкций по атрибутам.
Head Hunter
Qwen2.5 (7B) Datasets
|
|