Views
No views yet
1Prompt: Explain to me Shannon capacity.\n
2
3Model: Shannon capacity, also known as the channel capacity, is a fundamental concept in information theory and communication engineering. It was first introduced by Claude Shannon in his 1948 paper "A Mathematical Theory of Communication". The concept of channel capacity is used to determine the maximum amount of information that can be transmitted reliably through a communication channel, given the constraints of the channel's bandwidth, noise, and other factors.pip install transformers, then copy the snippet corresponding to your hardware and adapt it to your usecase.1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3model = AutoModelForCausalLM.from_pretrained("AliMaatouk/Llama-3.2-3B-Tele-it", torch_dtype="auto")
4tokenizer = AutoTokenizer.from_pretrained("AliMaatouk/Llama-3.2-3B-Tele-it")
5
6prompt = "Explain to me Shannon capacity.\n"
7input_ids = tokenizer(prompt, return_tensors="pt")
8outputs = model.generate(**input_ids, max_new_tokens=100)
9
10generated_tokens = outputs[0, len(input_ids['input_ids'][0]):]
11response = tokenizer.decode(generated_tokens, skip_special_tokens=True)
12print(response)1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model = AutoModelForCausalLM.from_pretrained("AliMaatouk/Llama-3.2-3B-Tele-it", torch_dtype="auto", device_map="auto")
5tokenizer = AutoTokenizer.from_pretrained("AliMaatouk/Llama-3.2-3B-Tele-it")
6
7prompt = "Explain to me Shannon capacity.\n"
8input_ids = tokenizer(prompt, return_tensors="pt").to("cuda")
9outputs = model.generate(**input_ids, max_new_tokens=100)
10
11generated_tokens = outputs[0, len(input_ids['input_ids'][0]):]
12response = tokenizer.decode(generated_tokens, skip_special_tokens=True)
13print(response)1@misc{maatouk2024telellmsseriesspecializedlarge,
2 title={Tele-LLMs: A Series of Specialized Large Language Models for Telecommunications},
3 author={Ali Maatouk and Kenny Chirino Ampudia and Rex Ying and Leandros Tassiulas},
4 year={2024},
5 eprint={2409.05314},
6 archivePrefix={arXiv},
7 primaryClass={cs.IT},
8 url={https://arxiv.org/abs/2409.05314},
9}