Views
No views yet
1Prompt: Explain to me Shannon capacity.\n
2
3Model: The Shannon capacity of a communication channel is the maximum amount of information that can be transmitted over the channel in a single transmission. It is a measure of the maximum amount of information that can be transmitted over a channel with a given noise level. The Shannon capacity is a fundamental limit on the amount of information that can be transmitted over a communication channel.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/TinyLlama-1.1B-Tele-it", torch_dtype="auto")
4tokenizer = AutoTokenizer.from_pretrained("AliMaatouk/TinyLlama-1.1B-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/TinyLlama-1.1B-Tele-it", torch_dtype="auto", device_map="auto")
5tokenizer = AutoTokenizer.from_pretrained("AliMaatouk/TinyLlama-1.1B-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}