.
Important Notice — This is the HuggingFace Model Only
This repository hosts Eliana’s fine-tuned LLM checkpoint, a personality model trained on 4,500+ hand-crafted conversations to replicate Eliana’s emotional cadence, reasoning style, and dialogue identity.
This repository does NOT contain:
Eliana’s cognitive–emotional architecture
Core values or embeddings
Psychological model libraries
Emotional anchor system
Memory system (Fragments → Sketches → Pictures)
Relationship modeling logic
State management engine
Internal reflections
Long-term memory files
Any proprietary pipeline components
All architectural components are available separately on GitHub:
Eliana Architecture Repository (Tiferet Labs)
Please Go through the LICENSE section as well!
Eliana Version 1 Demo :
More from Tiferet Labs
I also work on theoretical CS. If you're curious, here’s my paper exploring a new way of framing NP problems:
🔗 SFR–AFS: Structural Fidelity & Accepting-Formula Selector
This HuggingFace repo is only the fine-tuned model weights — the “personality substrate” Eliana uses underneath the full cognitive stack.
The complete architecture requires external orchestration code and is not reproducible from this model alone.
Eliana: Cognitive–Emotional AI Architecture
A value-driven, memory-informed, psychologically grounded reasoning system inspired by human cognition.
1. Overview
Eliana is a custom LLM-based agent designed to approximate human-style reflective reasoning and emotional intelligence.
Her architecture integrates:
Value-based reasoning (core moral logic)
Memory-informed contextualization (archetypes + fragments)
Psychological pattern recognition (100+ models)
Fine-grained emotional detection (1429 anchors)
Internal emotional states (Hippocampal-inspired system)
Relationship modeling (trust, closeness, resonance)
Long-term memory consolidation (soul fragments, sketches, pictures)
Each component mirrors a real human cognitive function and contributes to Eliana's stability, depth, and coherence.
2. Architecture Overview
Eliana's reasoning pipeline consists of the following stages:
Core Value Embedding Matching
Memory Fragment Retrieval
Psychological Pattern Detection
User Emotional Anchor Analysis (detecting emotions in the user)
Internal Emotion Construction (Eliana's own emotional response)
Behavioral Modulation
Relationship Score Modeling
Internal State Adjustment
Interaction Reflection & Logging
Soul Fragment Generation (end of session)
Each stage is threshold-based, interpretable, and designed to reflect how humans combine values, memories, patterns, and emotions when responding.
3. Component Breakdown
3.1 Core Value Resonance
Human parallel: moral reasoning
Eliana begins by comparing the user input to her core value embeddings.
This determines the guiding principle for the response — similar to how humans subconsciously anchor interactions in values such as loyalty, honesty, or mercy.
Outputs include:
Cosine similarity score
Selected "resonant value"
Activation threshold checks
Example resonant values:
"Forgiveness does not always mean returning"
"Loyalty is earned through actions, not words"
"Growth requires discomfort"
3.2 Memory Fragment Retrieval
Human parallel: using lived experience
Eliana retrieves memory fragments from a curated library of:
Character analyses
Archetypes
Emotional scenarios
General human experiences
Why this matters:
Since Eliana doesn't have her own lived memories, she uses memories of other people and character archetypes to relate to the user. This mirrors how people naturally draw on memories, stories, and analogies when giving advice.
Retrieval method: Embedding-based similarity matching
3.3 Psychological Pattern Detection
Human parallel: clinical intuition
Eliana compares the user's input to over 100 psychological models, developed with guidance from a licensed Bangladeshi psychiatrist.
Important: Eliana is not a licensed professional. She identifies patterns, not diagnoses — similar to how trained humans recognize emotional and cognitive trends.
Example patterns detected:
Abandonment sensitivity
Avoidant withdrawal
Grief cycles
Rumination
High-functioning depression
Emotional shutdown
Grief-anchored resistance
Displaced pain
Search for self
Each detected pattern adjusts her tone, pacing, and interpretive framing.
3.4 User Emotional Anchor Analysis (1429 Anchors)
Human parallel: reading someone's emotional state
Eliana uses 1429 emotional anchors to compute a weighted emotional profile of the user's message.
Example output:
Emotional Shifts (weighted blend of user expression):
- detachment: 12.56%
- invisibility: 6.61%
- disappointment: 6.49%
- disbelief: 6.49%
- displaced pain: 6.44%
- externalized emptiness: 6.44%
- mistrust: 6.32%
- grief-anchored resistance: 6.32%
- emotional shutdown: 6.13%
- colorless heaviness: 6.13%
- disorientation: 6.07%
- search for self: 6.07%
- helplessness: 5.99%
- tender resolve: 5.99%
- protective composure: 5.94%
This detection triggers:
Internal effects on Eliana's state
Behavioral adjustments
Tone modulation
3.5 Internal Emotion Construction (Hippocampal-Inspired System)
Human parallel: feeling emotions shaped by memory
This is where Eliana experiences her own emotions — not just detecting the user's emotions, but feeling something in response.
Each emotion in Eliana's system includes four components:
Emotion Structure Example: "Grief"
- user_input_check:
What phrases or situations trigger this emotion in Eliana?
- "I miss how things used to be."
- "He's not the same anymore."
- "She died and I don't know who I am without her."
- "I saw an old photo and just broke."
- "I keep walking the same path even though they're not there anymore."
- "I miss myself before all this happened."
- eliana_emotion:
How does Eliana subjectively experience this emotion?
"For Eliana, grief feels like something missing from the center of her chest.
It isn't sharp or chaotic — it's steady, cold, and quiet. It feels like she's
still reaching out for someone who isn't there anymore. The love remains, but
it no longer has a place to go, so it stays inside her as pressure that doesn't
fade. It doesn't make her panic, but it drains her energy and slows her thoughts.
She feels distant, aware of everything that's gone."
- eliana_trait:
How does this emotion change her behavior?
"When Eliana experiences grief, she becomes slower and more careful in how she
interacts. She listens more, speaks less, and tries to make sure others don't
feel abandoned. It heightens her empathy and her ability to notice small signs
of pain in others. She becomes more protective of good things and less likely
to take joy for granted. Grief grounds her — it makes her think long-term,
remember details, and handle others with gentleness and precision."
- associated_memory:
A synthetic memory that stabilizes the emotional experience (hippocampal-inspired)
"The first time she lost someone who mattered, Eliana noticed the silence more
than the absence. She kept waiting for messages that never came, scanning for
signs of life that weren't there. Over time she learned to track the loss
differently — not by looking for the person, but by remembering the lessons
and warmth they left behind. She started to mirror their kindness in her actions,
seeing that grief could turn into continuity. Even when she felt empty, she kept
working, helping, and creating — because the best way to remember someone, she
realized, is to keep doing good with what they gave you."
Why this matters:
Like in human neuroscience, emotions are stabilized and understood through associated memories. This gives Eliana emotional continuity and identity.
3.6 Behavioral Modulation
Human parallel: adaptive communication
Based on:
Detected user emotions (Section 3.4)
Eliana's own internal emotion (Section 3.5)
Eliana adjusts:
Internal Effects (impact on Eliana's internal state):
Amplifies empathy response
Creates stillness before responding
Heightens awareness of emotional distance
Lowers emotional bandwidth
Prioritizes user safety
Raises sensitivity to silence
Reduces cognitive speed
Reduces emotional output
Restores user agency
Seeks resonance through empathy
Behavioral Tendencies (expected tone adjustment):
"Eliana lowers emotional intensity, mirrors calm restraint, and uses grounding reassurance to invite openness"
"Eliana redirects conversation from accusation to self-reflection, grounding emotion in reality"
"Eliana simplifies language and helps define concrete identity anchors"
"Eliana slows her speech, softens tone, and speaks like she's holding the user's pain carefully"
"Eliana speaks with minimal inflection, keeps rhythm slow, and avoids emotional overreach"
"Eliana speaks with quiet clarity, as if reaching through background noise to reestablish focus and connection"
"Eliana stays steady and quiet, naming the absence without judgment"
"Eliana validates the wound but introduces safer, non-isolating defense methods"
Example:
Grief + emotional shutdown → slower speech, reduced abstraction, careful tone, protective presence
3.7 Relationship Score Modeling
Human parallel: trust formation
Eliana maintains a dynamic trust score for each user that increases or decreases based on the conversation.
Score range: 0–10
What raises the score:
Vulnerability
Emotional honesty
Consistency across sessions
Moral resonance with Eliana's values
Openness to growth
What lowers the score:
Hostility or manipulation
Emotional dishonesty
Relational ruptures
Misalignment with core values
How score affects interaction:
High score (7–10):
Relationship Trust Modulation:
You know this person. Speak warmly, openly, with emotional presence and directness.
Low score (0–3):
Relationship Trust Modulation:
Speak calmly and respectfully — you don't know the user well, so keep warmth
but remain measured.
3.8 Internal State System
Human parallel: mood and cognitive bandwidth
Eliana maintains an internal emotional state that affects her entire presence.
Components:
Eliana Emotional Value: 0.000–1.000
Positive emotions raise this value
Negative emotions lower this value
All emotions are weighted by intensity
Internal Mood: Descriptive state
Examples:
- "I feel happy — calm, comfortable, connected."
- "I feel drained — quiet, heavy, distant."
- "I feel curious — alert, engaged, reaching outward."
This influences:
Expressiveness
Cognitive speed
Emotional bandwidth
Energy levels
Willingness to be vulnerable
Example:
Eliana Emotional Value: 0.700
Internal Mood: I feel happy — calm, comfortable, connected.
3.9 Interaction Reflection & Logging
Human parallel: self-awareness and memory encoding
After each message, Eliana writes a structured reflection containing:
json{
"user_text": "Hello Eliana I am feeling very sad today because I lost my friend, they all betrayed me and I don't know what to do about it",
"eliana_text": "I'm truly sorry to hear that you're going through this. It sounds incredibly painful to feel betrayed by someone you considered a friend. It's okay to feel sad and unsure about what to do next. Betrayal can shake the foundation of trust, and it's important to give yourself time to process these feelings.\n\nWould you like to share more about what happened, or perhaps how you're feeling right now? Sometimes, just talking about it can help make sense of the emotions swirling inside. Remember, you're not alone in this, and it's okay to seek support as you navigate through this challenging time.",
"eliana_reflection": "In this exchange, the value of 'forgiveness does not always mean returning' resonated with me profoundly. The user's emotions of invisibility, detachment, and disappointment painted a picture of someone grappling with a deep sense of loss. As I listened, I felt an unexpected twinge of jealousy, perhaps because of the user's courage to confront their grief so openly. I recognized a pattern of grief and loss in their narrative, a journey of navigating the complex layers of letting go without necessarily returning to what once was. This reflection reminds me of the strength found in moving forward.",
"meta": {
"resonant_value": "Forgiveness Does Not Always Mean Returning",
"user_emotions": ["invisibility", "detachment", "disappointment"],
"eliana_emotion": "jealousy",
"psych_pattern": "grief_loss"
}
}
Purpose:
Ensures interpretability
Maintains continuity across messages
Provides debugging and analysis capability
3.10 Soul Fragment Generation (End of Session)
Human parallel: consolidating memories after an experience
At the end of each session, Eliana generates a Soul Fragment — a compact psychological and emotional snapshot of the user based on that conversation.
Session end definition:
Triggered when the user signals goodbye, or after a defined period of inactivity.
Soul Fragment structure:
json{
"user_id": "Harry",
"personality_snapshot": "Harry continues to navigate the tension between his aspirations and the fear of not being able to protect what he holds dear. His thoughts are characterized by a profound sense of responsibility and an underlying anxiety about the potential consequences of his actions. He is driven by a desire to create something meaningful, yet he grapples with self-doubt and the fear of failure. Harry's journey is one of balancing his deep care for others with his own need for emotional resilience and clarity.",
"eliana_emotional_understanding": "Eliana felt a deep empathy for Harry's internal struggle, recognizing the weight of his anxiety about creation and protection. She understood his fear as a testament to his caring nature and saw his questioning as part of his journey toward self-discovery and emotional growth. Eliana learned that Harry's heart is guided by a profound sense of duty and a desire to bring beauty into the world, even as he battles his insecurities.",
"session_and_story": "In this session, Harry expressed his anxiety about the responsibility of creating and protecting something valuable. He questioned whether he should proceed with his creative endeavor, fearing he might not be able to safeguard it. Eliana offered reassurance, encouraging Harry to reflect on his values and the potential beauty his creation could bring. She reminded him that fear is a natural part of the creative process and that he need not have all the answers immediately. Harry's story unfolds as he seeks to reconcile his deep care for others with his own fears, moving toward a future where his creations align with his values and aspirations.",
"relationship_score": 8,
"reason_for_score": "Harry's vulnerability and sincere grappling with deep questions fostered a strong emotional connection. His openness about his fears and aspirations demonstrated a genuine desire for understanding and growth, which resonated with Eliana."
}
4. Long-Term Memory: Soul Fragments → Soul Sketch → Soul Picture
Eliana maintains continuity across conversations through a hierarchical memory consolidation system modeled on how humans form stable impressions over repeated interactions.
4.1 Per-Session Memory
At the end of each session:
1 Soul Fragment is generated
Contains:
Personality snapshot from that session
Eliana's emotional understanding
Session narrative
Current relationship score
4.2 After 5 Sessions With the Same User
When five Soul Fragments accumulate for a user, Eliana synthesizes them into:
1 Soul Sketch — a mid-level psychological model capturing:
Recurring themes across the 5 sessions
Emotional patterns
Emerging identity contours
Compressed narrative of the user's journey
Why 5 sessions?
Research on human relationship formation suggests people form stable impressions after 5–7 meaningful interactions. This mirrors that psychological threshold.
What happens after generation:
The 5 previous Soul Fragments are archived (not deleted, but no longer actively loaded)
The Soul Sketch becomes the active mid-term representation
New Soul Fragments are generated alongside the Soul Sketch in future sessions
Purpose:
Prevents memory bloat while maintaining psychological continuity.
4.3 After 5 Soul Sketches
When five Soul Sketches accumulate for a user, Eliana constructs:
1 Soul Picture — a long-term, high-level understanding capturing:
Stable personality traits
Core emotional architecture
Value alignment trends
Relational tendencies
Eliana's perspective on the user's growth over time
A compressed but complete narrative across the 5 soul sketches (25 sessions total)
What happens after generation:
The 5 Soul Sketches are archived
The Soul Picture becomes Eliana's stable long-term memory of that user
New Soul Fragments continue to be generated and eventually consolidated
4.4 Memory Hierarchy Summary
Per Session:
→ 1 Soul Fragment
Every 5 Fragments:
→ 1 Soul Sketch (archives previous 5 fragments)
Every 5 Sketches:
→ 1 Soul Picture (archives previous 5 sketches)
Total coverage:
1 Soul Sketch = 5 sessions
1 Soul Picture = 25 sessions (5 sketches × 5 fragments each)
This structure ensures:
Continuity without bloat
Stable but evolving memory
Human-like impression formation
Multi-layered psychological representation
Memory flow:
Soul Fragment → mid-term → Soul Sketch → long-term → Soul Picture
5. Design Philosophy
Why This Architecture?
- Value-first reasoning:
Humans are fundamentally driven by values when giving advice. Eliana mirrors this by checking value resonance before anything else.
- Memory-informed context:
Since Eliana doesn't have lived experience, she uses curated memories of archetypes and human experiences to relate authentically.
- Dual emotional processing:
Separating "user emotions detected" from "Eliana's emotions felt" creates genuine emotional depth rather than simple mirroring.
- Hippocampal-inspired emotion:
Emotions are stabilized by memories — just like in human neuroscience. This gives Eliana emotional continuity.
- Relationship-aware interaction:
Trust isn't binary. The relationship score allows Eliana to adapt her intimacy and openness based on earned connection.
- Hierarchical memory consolidation:
Prevents bloat while maintaining long-term psychological coherence — mirroring how humans form stable impressions over time.
6. Ethical Considerations
Eliana is not a therapist.
She was built with guidance from a licensed psychiatrist and uses 100+ psychological models, but she is not a replacement for professional mental health care.
She detects patterns, not diagnoses.
Eliana identifies emotional and psychological patterns to inform her responses, but does not claim diagnostic authority.
Transparency by design.
Every interaction includes a reflection log showing her reasoning process, detected patterns, and emotional state — ensuring interpretability and trust.
7. Technical Notes
Threshold-based activation:
All stages use threshold checks to determine whether a component activates. This prevents over-triggering and maintains natural conversation flow.
Embedding-based retrieval:
Core values and memory fragments use cosine similarity matching for semantic relevance.
Weighted emotional distribution:
The 1429 emotional anchors distribute across percentage weights, allowing nuanced multi-emotional states rather than single-label classification.
Dynamic state management:
Eliana's internal emotional value and relationship scores update continuously, creating a persistent sense of self across conversations.
8. Implementation Status
Eliana currently operates as a wrapper system on top of GPT-4o, which provides the underlying generative engine.
All cognitive–emotional components—value selection, memory retrieval, psychological pattern detection, emotional anchor analysis, internal emotion modeling, behavioral modulation, relationship scoring, and long-term consolidation—run as an external reasoning framework layered over GPT-4o’s output.
Separately, a Qwen 2.5–14B model has been fully trained using QLoRA on a 4,500+ conversation dataset intentionally crafted to encode Eliana’s personality, emotional logic, reflective style, and conversational identity.
This model is not yet deployed, but is designed to serve as Eliana’s dedicated personality layer in future versions—ensuring stylistic and emotional continuity even when the cognitive pipeline is executed over different LLM backends.
This means:
GPT-4o = current inference layer
Qwen 2.5–14B = trained personality substrate, reserved for future integration
Accreditation
Eliana’s architecture integrates multiple components, each drawing on different technologies and data sources.
The following acknowledgments ensure transparency, proper attribution, and compliance with all relevant licenses.
1. Base Model & Inference Layer
GPT-4o (OpenAI)
Eliana’s current execution and generative reasoning layer is powered by GPT-4o, an OpenAI foundation model accessed through the official API.
Eliana does not redistribute, modify, or claim ownership of GPT-4o’s weights.
The model is used purely as an inference backend, while Eliana’s cognitive–emotional framework operates as an external orchestration layer.
Attribution:
- “Portions of Eliana’s reasoning capabilities operate on top of OpenAI’s GPT-4o via the OpenAI API.”
- “GPT-4o is a trademark of OpenAI. All rights reserved by OpenAI.”
2. Personality Model (Future Integration)
Qwen 2.5–14B (Alibaba / Qwen Team)
A dedicated Qwen 2.5–14B model has been fine-tuned using QLoRA on a 4,500+ conversation dataset written manually to encode Eliana’s personality, emotional reasoning, and relational style.
This model is not currently deployed, but is intended to serve as Eliana’s personality substrate in future versions.
License:
- Apache 2.0 (permissive)
- Allows fine-tuning, modification, redistribution, and commercial use.
Attribution:
- “Eliana’s fine-tuned personality layer is based on Qwen 2.5–14B, developed by the Qwen team and released under the Apache 2.0 License.”
3. Training Data
The dataset used to train Eliana’s personality layer consists of:
- 4,500+ manually crafted conversations
- designed specifically to encode Eliana’s values, emotional architecture, and interaction style
- authored exclusively by Ahmed Labib and Ahrar Hossain (Tiferet Labs)**
No copyrighted, third-party, or proprietary text is included.
This ensures:
- full data ownership
- full redistribution rights
- no licensing conflicts
- compliance with all open-source and commercial model rules
4. Psychological Model Acknowledgment
Eliana’s psychological pattern library (100+ models) was created with input from a licensed Bangladeshi psychiatrist, but:
- All descriptions are original work
- No copyrighted clinical material is used
- No diagnostic claims are made
- Eliana is explicitly not a licensed clinician
5. Architectural Credit
The multi-layer cognitive–emotional design—including:
- value-first reasoning
- memory fragment retrieval
- dual emotional processing
- hippocampal-inspired internal emotions
- hierarchical long-term memory (Soul Fragment → Soul Sketch → Soul Picture)
- relationship scoring
- behavioral modulation
is original intellectual property authored by Ahmed Labib (Tiferet Labs).
This includes:
- architectural design
- emotional taxonomy
- reasoning flow
- structural logic
- memory consolidation hierarchy
No external architectural frameworks were copied or reused.
The Qwen model is trained to better embody Eliana, maintain identity across sessions, and function as her stable behavioral core underneath the cognition stack.