Views
No views yet
| Parameter | Value |
|---|---|
| Architecture | LlamaForCausalLM |
| Parameters | 3B |
| Hidden Size | 3072 |
| Intermediate Size | 8192 |
| Attention Heads | 24 |
| Hidden Layers | 28 |
| Vocab Size | 32,000 |
| Context Length | 4,096 |
| Precision | bfloat16 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "albertic-ai/Laika-1-3B"
4
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
7
8messages = [
9 {"role": "system", "content": "You are Laika, an AI assistant specialized in space science, astronomy, satellite operations, and aerospace engineering."},
10 {"role": "user", "content": "Explain the concept of Lagrange points and their significance for space missions."}
11]
12
13input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(model.device)
14
15outputs = model.generate(
16 input_ids,
17 max_new_tokens=512,
18 temperature=0.7,
19 top_p=0.9,
20 do_sample=True,
21)
22
23response = tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True)
24print(response)1from transformers import pipeline
2
3pipe = pipeline(
4 "text-generation",
5 model="albertic-ai/Laika-1-3B",
6 torch_dtype="auto",
7 device_map="auto",
8)
9
10messages = [
11 {"role": "user", "content": "What are the main challenges of interplanetary travel?"}
12]
13
14output = pipe(messages, max_new_tokens=512)
15print(output[0]["generated_text"][-1]["content"])<s>### System:
You are Laika, an AI assistant specialized in space science, astronomy, satellite operations, and aerospace engineering.
### User:
{user_message}
### Assistant:
{assistant_response}</s>1@misc{laika-1-3b,
2 title={Laika-1-3B: A Language Model for Space Science},
3 author={Albertic AI},
4 year={2024},
5 url={https://huggingface.co/albertic-ai/Laika-1-3B}
6}