TSLAM-4B / README.md
NetoAI's picture
Updated with latest benchmarking stats
e9104e2 verified
metadata
license: apache-2.0
language:
  - en

TSLAM-4b: Telecom-Specific Large Action Model

TSLAM-4b is a 4 billion parameter large language model specifically designed and fine-tuned for the telecommunications industry. This model builds upon the capabilities of large language models and incorporates domain-specific knowledge and actions relevant to telecom operations, planning, and customer service. It supports context length of 128K tokens.

Key Features

  • Telecom-Specific: Fine-tuned on a large corpus of telecom-related data, including technical documentation, customer interactions, and network operations.
  • Action-Oriented: Designed to not only understand telecom concepts but also to suggest and execute relevant actions in telecom scenarios.
  • 4B Parameters: A balanced model size that offers strong performance while remaining deployable in various environments.
  • 128K Context Length: Larger context length to enable conversations spanning multiple messages.
  • 4 Bit Quantised: To allow inference to be done even with GPUs on laptops (4060 and above)

Use Cases

  • Network troubleshooting and diagnostics
  • Network capacity management
  • Customer support automation
  • Telecom infrastructure planning
  • Regulatory compliance assistance
  • Technical documentation generation

Getting Started

Prerequisites

  • Python 3.10+
  • PyTorch 1.9+
  • Transformers library

Installation

To use TSLAM-4b, you need to have the Transformers library installed:

pip install transformers

Basic Usage

For inference you can import and use the TSLAM-4b model directly with the Transformers library:

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained(".", use_auth_token=None)
model = AutoModelForCausalLM.from_pretrained(".", use_auth_token=None)

# Set device
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

# Example text input
text_input = "How QOS is applied on routers?" 

p="""
<|system|>
You are a helpful assistant.<|end|>
<|user|>""" + text_input + """<|end|>
<|assistant|>
"""

# Tokenize and move input to device
inputs = tokenizer(p, return_tensors="pt")
inputs = inputs.to(device)

print("User Query: " + text_input)
# Generate text on the device
outputs = model.generate(**inputs, max_length=2000, num_return_sequences=1)

print("Model Response: ")
# Decode generated text
for output in outputs:
    generated_text = tokenizer.decode(output, skip_special_tokens=True)
    print(generated_text)

Benchmarking result of TSLAM-4B vs Llama vs Gemini on Telecom Data

image/png

image/png

Sample Request and Response from the model

User Query: Interface on a cisco device gone down, how to fix?

Model Response:

I'm sorry, but as an AI text-based model, I can't directly interact with or troubleshoot hardware devices. However, I can guide you through the process of diagnosing and potentially resolving an interface issue on a Cisco device.

Here are the steps you can follow to troubleshoot an interface that has gone down on a Cisco device:

  1. Check the Cisco device's console output:

    • Connect to the device using a console cable (usually a DB-9 or mini-USB to RJ-45 adapter).
    • Once connected, access the device's command-line interface (CLI) by typing enable and then show running-config.
    • Look for any error messages or indications that the interface is down.
  2. Check the status of the interface:

    • In the CLI, type show interfaces to display the status of all interfaces.
    • Look for the specific interface that is down and note any error messages or indications of the problem.
  3. Check the interface configuration:

    • In the CLI, type show running-config interface [interface-name] to display the configuration of the specific interface.
    • Verify that the interface is configured correctly, with the correct IP address, subnet mask, and default gateway if applicable.
  4. Check the physical connection:

    • Ensure that the interface cable is properly connected to the device and the other end is connected to the corresponding port on the other device.
    • Check for any physical damage to the cable or port.
  5. Check the port configuration:

    • In the CLI, type show running-config interface [interface-name] port-channel [port-channel-number] if the interface is part of a port-channel.
    • Verify that the port-channel is configured correctly and that the interface is in the correct mode (active/backup or active).
  6. Check the link status:

    • In the CLI, type show interfaces [interface-name] link to display the link status of the interface.
    • If the link status is down, check for any physical issues or configuration errors.
  7. Check the interface counters:

    • In the CLI, type show interfaces [interface-name] counters to display the interface counters.
    • Look for any errors or dropped packets that may indicate a problem with the interface.
  8. Check the routing table:

    • In the CLI, type show ip route to display the routing table.
    • Verify that the correct routes are present and that the device can reach the destination.
  9. Check the VLAN configuration:

    • In the CLI, type show vlan to display the VLAN configuration.
    • Verify that the VLAN is configured correctly and that the interface is assigned to the correct VLAN.
  10. Check the spanning tree configuration:

    • In the CLI, type show spanning-tree to display the spanning tree configuration.
    • Verify that the spanning tree protocol (STP) is configured correctly and that there are no issues with the spanning tree topology.

If you've gone through these steps and still can't resolve the issue, you may need to consult the device's documentation or contact Cisco support for further assistance. Remember to always follow best practices and safety procedures when working with network devices.


User Query: How to configure BGP in cisco router?

Model Response:

Configuring BGP (Border Gateway Protocol) on a Cisco router involves several steps, from initial setup to establishing a full BGP session with a peer. Here's a step-byatively guide you through the process:

  1. Access the Cisco IOS:

    • Connect to your Cisco router via console, SSH, or Telnet.
  2. Enter Global Configuration Mode:

    • Type enable to access privileged EXEC mode.
    • Type configure terminal (or conf t) to enter global configuration mode.
  3. Create a BGP Router:

    • Type router bgp followed by the AS number you want to use.
  4. Configure BGP Options:

    • Set the router ID (optional, but recommended for large networks).
    • Configure the BGP timers (keepalive, hold-down, and restart).
    • Set the BGP mode (either standard or routing-only).
  5. Define BGP Neighbors:

    • Use the neighbor command to define BGP neighbors.
    • Specify the IP address and AS number of the neighbor router.
    • Configure the BGP session options (timers, password, and Hello/Hold-Down/Restart).
  6. Configure BGP Routing Policies:

    • Use the redistribute command to define how BGP will redistribute routes from other protocols (e.g., OSPF, EIGRP).
    • Configure the redistribution options (metric, route-map, and route-policy).
  7. Define BGP Address Family Policies:

    • Use the address-family command to define policies for specific address families (e.g., IPv4, IPv6).
    • Configure the policies (route-map, prefix-list, and route-policy).
  8. Configure BGP Route Filtering:

    • Use the route-filter command to define policies for filtering BGP routes.
    • Configure the route-filter options (route-map, prefix-list, and route-policy).
  9. Verify BGP Configuration:

    • Use the show ip bgp command to verify the BGP configuration.
    • Check the BGP table, neighbors, routes, and policies.
  10. Save Configuration:

    • Type write memory or copy running-config startup-config to save the configuration.

Here's an example of a basic BGP configuration on a Cisco router:

Router# enable
Router(config)# configure terminal
Router(config)# router bgp 65001
Router(config-router)# router-id 1.1.1.1
Router(config-router)# bgp router-id 1.1.1.1
Router(config-router)# timers 30 120 30
Router(config-router)# address-family ipv4
Router(config-if)# exit
Router(config-if)# exit
Router(config)# exit
Router# write memory

This example configures a BGP router with AS number 65001, a router ID of 1.1.1.1, and sets the BGP timers to 30 seconds for keepalive, 120 seconds for hold-down, and 30 seconds for restart. It also defines the IPv4 address family.

Remember that BGP configuration can be complex and may vary based on your network topology, requirements, and the specific features you want to implement. It's recommended to consult Cisco's official documentation and best practices for more detailed guidance.


User Query: How QoS works, how does voice traffic gets prioritised?

Model Response:

Quality of Service (QoS) is a set of technologies and techniques used to manage network resources and ensure that certain types of network traffic, such as voice and video, receive priority over other types of traffic. This is important because voice and video traffic are sensitive to delays, jitter, and packet loss, which can degrade the quality of the communication.

Here's how QoS works and how voice traffic gets prioritized:

  1. Classification: The first step in QoS is to classify network traffic based on its type, source, destination, and other criteria. This can be done using various methods, such as Deep Packet Inspection (DPI), which examines the contents of packets to determine their type, or by using predefined rules or policies.

  2. Marking: Once the traffic is classified, it is marked with a specific QoS level or class. This marking is done by the network devices, such as routers and switches, using QoS tags or labels. The marking indicates the priority of the traffic, with higher priority traffic being marked with a higher QoS level.

  3. Scheduling: The marked traffic is then scheduled for transmission based on its QoS level. Network devices use scheduling algorithms to determine the order in which packets are transmitted, with higher priority traffic being transmitted first. This ensures that voice and video traffic are sent with minimal delay and jitter.

  4. Traffic shaping: Traffic shaping is another technique used to manage network traffic and ensure that voice and video traffic receive priority. Traffic shaping involves controlling the rate at which packets are sent, based on their QoS level. This ensures that high-priority traffic is sent at a consistent rate, while lower-priority traffic is sent at a lower rate.

  5. Congestion management: In case of network congestion, QoS techniques are used to manage the traffic and ensure that voice and video traffic are not affected. This can be done using techniques such as traffic policing, which limits the rate at which packets are sent, or by dropping packets with lower priority.

By using these techniques, QoS ensures that voice and video traffic receive priority over other types of traffic, resulting in a high-quality communication experience. This is particularly important in scenarios where network resources are limited, such as in wireless networks or in networks with high traffic volumes.


User Query: How QOS is applied on routers?

Model Response:

Quality of Service (QoS) is a critical feature in networking that allows network administrators to prioritize certain types of traffic over others, ensuring that critical applications and services receive the bandwidth and low latency they require to function optimally. Routers, being the central devices that direct traffic between different networks, play a pived role in implementing QoS policies. Here's how QoS is applied on routers:

  1. Traffic Classification: Routers classify network traffic based on various criteria such as port numbers, IP addresses, protocols, and application types. This classification helps in identifying the type of traffic (e.g., VoIP, video streaming, or email) and its priority level.

  2. Policy Definition: Network administrators define QoS policies based on the classification results. These policies specify how different types of traffic should be treated, including their priority, bandwidth allocation, and maximum delay (latency).

  3. Traffic Marking: Once the policies are defined, routers mark packets based on their classification. This marking is done using QoS tags or labels that indicate the priority level of the packet. Common QoS tags include Differentiated Services Code Point (DSCP) values, which are 6-bit fields in the IP header.

  4. Traffic Shaping: Routers use traffic shaping techniques to control the rate of traffic flow. This involves setting bandwidth limits for different types of traffic, ensuring that high-priority traffic (e.g., VoIP) gets the necessary bandwidth, while lower-priority traffic (e.g., file downloads) may be limited or delayed.

  5. Traffic Policing: Routers also implement traffic policing to enforce the defined policies. If a flow exceeds its allocated bandwidth, the router can drop or mark the excess packets, ensuring that the traffic conforms to the QoS policies.

  6. Traffic Scheduling: Routers use scheduling algorithms to decide when packets should be transmitted based on their priority and the current network conditions. This helps in managing congestion and ensuring that high-priority traffic gets transmitted first.

  7. Traffic Engineering: Routers can also perform traffic engineering to optimize the use of available network resources. This involves rerouting traffic through less congested paths or adjusting link weights to balance the load across the network.

  8. Monitoring and Reporting: Routers continuously monitor network performance and report on QoS metrics such as packet loss, latency, and jitter. This information helps network administrators to fine-tune QoS policies and ensure that the network meets the required performance standards.

In summary, QoS on routers involves classifying, marking, shaping, policing, and scheduling network traffic based on predefined policies. This ensures that critical applications and services receive the necessary bandwidth and low latency, while less critical traffic is managed according to the defined priorities. By implementing QoS, network administrators can optimize network performance, improve user experience, and ensure that the network meets the required service levels.


Fine-tuning

TSLAM-4b can be further fine-tuned on your specific telecom datasets or use cases. Refer to the Transformers library documentation for detailed fine-tuning instructions.

Limitations

  • While TSLAM-4b is trained on a wide range of telecom data, it may not cover all specific protocols or proprietary systems.
  • The model's knowledge cutoff date is [insert date]. For the most up-to-date information, especially regarding rapidly evolving technologies, please consult current sources.

Responsible AI Considerations

Like other language models, the TSLAM family of models can potentially behave in ways that are unfair, unreliable, or offensive. Some of the limiting behaviors to be aware of include:

  1. Quality of Service: TSLAM models are trained primarily on English text and some additional multilingual text. Languages other than English will experience worse performance as well as performance disparities across non-English languages. English language varieties with less representation in the training data might experience worse performance than standard American English.

  2. Multilingual performance and safety gaps: As with any deployment of LLMs, developers will be better positioned to test for performance or safety gaps for their linguistic and cultural context and customize the model with additional fine-tuning and appropriate safeguards.

  3. Representation of Harms & Perpetuation of Stereotypes: These models can over- or under-represent groups of people, erase representation of some groups, or reinforce demeaning or negative stereotypes.

  4. Inappropriate or Offensive Content: These models may produce other types of inappropriate or offensive content, which may make it inappropriate to deploy for sensitive contexts without additional mitigations that are specific to the case.

  5. Information Reliability: Language models can generate nonsensical content or fabricate content that might sound reasonable but is inaccurate or outdated.

  6. Long Conversation: TSLAM models, like other models, can in some cases generate responses that are repetitive, unhelpful, or inconsistent in very long chat sessions in both English and non-English languages.

Developers should apply responsible AI best practices, including mapping, measuring, and mitigating risks associated with their specific use case and cultural, linguistic context. Important areas for consideration include:

  • Allocation: Models may not be suitable for scenarios that could have consequential impact on legal status or the allocation of resources or life opportunities without further assessments and additional debiasing techniques.

  • High-Risk Scenarios: Developers should assess the suitability of using models in high-risk scenarios where unfair, unreliable or offensive outputs might be extremely costly or lead to harm.

  • Misinformation: Models may produce inaccurate information. Developers should follow transparency best practices and inform end-users they are interacting with an AI system.

  • Generation of Harmful Content: Developers should assess outputs for their context and use available safety classifiers or custom solutions appropriate for their use case.

  • Misuse: Other forms of misuse such as fraud, spam, or malware production may be possible, and developers should ensure that their applications do not violate applicable laws and regulations.

Developers are encouraged to fine-tune the models for their use case and leverage the models as part of broader AI systems with language-specific safeguards in place.

License

license: apache-2.0

Contact

For support, feature requests, or to report issues, please contact [email protected].