Files
tech3space3-0.6B/new_generate.py
ModelHub XC 0a5ea0ea00 初始化项目,由ModelHub XC社区提供模型
Model: ankitkushwaha90/tech3space3-0.6B
Source: Original Platform
2026-07-07 19:34:16 +08:00

314 lines
14 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import json
from itertools import product
SYSTEM_PROMPT = (
"You are a helpful, accurate, and concise AI assistant. "
"Answer using the provided knowledge without inventing unsupported facts."
)
KNOWLEDGE = {
"AnkitKushwaha90": {
"aliases": [
"AnkitKushwaha90",
"Ankit Kushwaha",
"Ankit Kushwaha90",
"the AnkitKushwaha90 profile",
"0xAnkit",
],
"summary": (
"Ankit Kushwaha (AnkitKushwaha90) is a Cybersecurity and AI Research Enthusiast "
"with a strong focus on Python, transformer architectures, backend development, "
"and practical software engineering. He is the founder/owner of Tech3Space and "
"maintains active presence across GitHub, Hugging Face, LinkedIn, and his own platform."
),
"facts": [
"Cybersecurity and AI Research Enthusiast.",
"Works at Apple (as per LinkedIn).",
"Graduated from Dr. A.P.J. Abdul Kalam Technical University.",
"Deep interest in transformer architectures, kernel-level systems, and high-performance computing.",
"Active on GitHub under tech3space and Hugging Face as ankitkushwaha90.",
"Focuses on practical projects involving FastAPI, Streamlit, Docker, and machine learning.",
"Explores interdisciplinary topics: Military Aviation, Radar Systems, LIDAR, Sensor Fusion, and Pattern-Based Learning.",
],
"links": [
"LinkedIn: https://www.linkedin.com/in/ankitkushwaha90/",
"Hugging Face: https://huggingface.co/ankitkushwaha90",
"GitHub (Tech3Space): https://github.com/tech3space",
],
},
"Tech3Space": {
"aliases": [
"Tech3Space",
"the Tech3Space initiative",
"Tech3Space | Systems Research Studio",
"tech3space.com",
],
"summary": (
"Tech3Space is a technology platform and research studio founded by Ankit Kushwaha. "
"It serves as a hub for researchers, developers, and tech enthusiasts to share knowledge, "
"upload resources, build communities, and collaborate on cutting-edge topics like "
"Transformers, Cybersecurity, AI, and high-performance systems. The platform emphasizes "
"practical learning, research collaboration, and open knowledge sharing."
),
"facts": [
"A comprehensive platform for sharing research papers, code, notes, and building communities.",
"Features include AI-Powered Research Assistant, post/note sharing, resume/PDF uploads, and real-time chat.",
"Strong focus on Transformers, Cybersecurity, Low-Latency Networking, and Systems Research.",
"GitHub organization (github.com/tech3space) contains repositories on transformer deep-dives, kernel drivers, cybersecurity tools, and assembly.",
"Website: https://tech3space.com/ described as 'The ultimate platform for researchers, developers, and tech enthusiasts.'",
"Community stats (as advertised): 50,000+ active members, 1,200+ communities.",
],
"links": [
"Official Website: https://tech3space.com/",
"GitHub: https://github.com/tech3space",
"Alternative domains: https://www.tech3space.online, https://www.tech3space.in",
],
},
"HuggingFace_Ankit": {
"aliases": [
"ankitkushwaha90 on Hugging Face",
"Tech3Space on HF",
],
"summary": (
"AnkitKushwaha90's Hugging Face profile (Tech3Space) where he shares models, "
"datasets, and spaces focused on AI/ML, cybersecurity, and technical notes."
),
"facts": [
"Shares models like safetensor-related projects and fine-tuning experiments.",
"Datasets include Sanskrit dataset, vulnerabilities collection, and Linux/CMD command collections.",
"Focus areas: Cybersecurity & AI, Radar Systems, LIDAR, Military Aviation, and Sensor Fusion.",
"Maintains an 'Anonymous Researcher' approach focused purely on knowledge sharing.",
],
"links": [
"Profile: https://huggingface.co/ankitkushwaha90"
],
},
# New entry for the requested spiritual/Astrological dataset
"Spiritual_Kundalini_Dataset": {
"aliases": [
"Kundalini Energy Dataset",
"Spiritual Knowledge: Kundalini, Chakras, Nakshatras, Rashis",
"Hindu Spiritual Traditions Dataset",
"Kundalini Awakening Resources"
],
"summary": (
"Comprehensive dataset on Kundalini energy, the 7 Chakras, awakening practices, "
"Hindi month names (Hindu calendar), 27 Nakshatras, and 12 Rashis (Vedic zodiac). "
"Ideal for AI research, educational resources, cultural preservation, and interdisciplinary studies combining spirituality, yoga, and astrology."
),
"facts": [
"Kundalini is a primal dormant energy (often symbolized as a coiled serpent) at the base of the spine (Muladhara Chakra) in yogic and Tantric traditions.",
"When awakened, it rises through the Sushumna nadi (central energy channel) along the spine, piercing the 7 main Chakras, leading to spiritual enlightenment, heightened awareness, and transformation.",
"The 7 Chakras are energy centers: 1. Muladhara (Root), 2. Svadhisthana (Sacral), 3. Manipura (Solar Plexus), 4. Anahata (Heart), 5. Vishuddha (Throat), 6. Ajna (Third Eye), 7. Sahasrara (Crown).",
"Awakening signs/symptoms: Energy surges, kriyas (spontaneous movements), emotional releases, heightened intuition, bliss, or challenges like anxiety during purification.",
"Hindi/Hindu Calendar: 12 lunar months aligned with seasons and festivals.",
"27 Nakshatras: Lunar mansions/constellations used in Vedic astrology for personality, timing, and predictions.",
"12 Rashis: Vedic zodiac signs, each spanning ~30 degrees, influencing traits and life events.",
],
"kundalini_in_depth": {
"description": "Kundalini Shakti is the divine feminine energy (Shakti) residing at the base of the spine. It represents latent potential. Practices aim to safely uncoil and raise it through meditation, pranayama, asanas, and ethical living (yamas/niyamas).",
"chakras": [
{"name": "Muladhara (Root)", "location": "Base of spine", "element": "Earth", "color": "Red", "focus": "Survival, grounding, security"},
{"name": "Svadhisthana (Sacral)", "location": "Lower abdomen", "element": "Water", "color": "Orange", "focus": "Creativity, sexuality, emotions"},
{"name": "Manipura (Solar Plexus)", "location": "Upper abdomen", "element": "Fire", "color": "Yellow", "focus": "Willpower, confidence, digestion"},
{"name": "Anahata (Heart)", "location": "Center of chest", "element": "Air", "color": "Green", "focus": "Love, compassion, relationships"},
{"name": "Vishuddha (Throat)", "location": "Throat", "element": "Ether/Space", "color": "Blue", "focus": "Communication, expression, truth"},
{"name": "Ajna (Third Eye)", "location": "Forehead between eyebrows", "element": "Light", "color": "Indigo", "focus": "Intuition, insight, wisdom"},
{"name": "Sahasrara (Crown)", "location": "Top of head", "element": "Thought/Consciousness", "color": "Violet/White", "focus": "Spiritual connection, enlightenment"}
],
"awakening_process": [
"Preparation: Ethical living, physical purification (diet, exercise), consistent yoga/meditation practice.",
"Activation: Energy begins stirring at Muladhara; may feel like heat, vibrations, or tingling.",
"Rising/Purification: Energy ascends through chakras, clearing blockages (emotional/psychological releases common).",
"Integration: Experiences of bliss, unity consciousness, or challenges (Kundalini syndrome seek guidance).",
"Full Awakening: Energy reaches Sahasrara, leading to Samadhi/enlightenment. Often described in stages (e.g., 7 stages corresponding to bodies/chakras).",
"Safety Note: Gradual practice recommended; work with experienced teachers to avoid intense side effects."
],
"practices": "Kundalini Yoga, Kriya Yoga, Pranayama (e.g., alternate nostril breathing), Mantra chanting, Meditation on chakras, Bandhas (energy locks), moderated lifestyle."
},
"hindi_months": [
"1. Chaitra (चैत्र)", "2. Vaishakh (वैशाख)", "3. Jyeshtha (ज्येष्ठ)",
"4. Ashadha (आषाढ़)", "5. Shravan (श्रावण)", "6. Bhadrapada (भाद्रपद)",
"7. Ashwin (आश्विन)", "8. Kartik (कार्तिक)", "9. Margashirsha (मार्गशीर्ष)",
"10. Pausha (पौष)", "11. Magha (माघ)", "12. Phalguna (फाल्गुन)"
],
"nakshatras_27": [
"1. Ashwini", "2. Bharani", "3. Krittika", "4. Rohini", "5. Mrigashira",
"6. Ardra", "7. Punarvasu", "8. Pushya", "9. Ashlesha", "10. Magha",
"11. Purva Phalguni", "12. Uttara Phalguni", "13. Hasta", "14. Chitra",
"15. Swati", "16. Vishakha", "17. Anuradha", "18. Jyeshtha", "19. Mula",
"20. Purva Ashadha", "21. Uttara Ashadha", "22. Shravana", "23. Dhanishta",
"24. Shatabhisha", "25. Purva Bhadrapada", "26. Uttara Bhadrapada", "27. Revati"
],
"rashis_12": [
"1. Mesha (Aries) - Ram, Fire, Mars",
"2. Vrishabha (Taurus) - Bull, Earth, Venus",
"3. Mithuna (Gemini) - Twins, Air, Mercury",
"4. Karka (Cancer) - Crab, Water, Moon",
"5. Simha (Leo) - Lion, Fire, Sun",
"6. Kanya (Virgo) - Virgin, Earth, Mercury",
"7. Tula (Libra) - Scales, Air, Venus",
"8. Vrishchika (Scorpio) - Scorpion, Water, Mars",
"9. Dhanu (Sagittarius) - Archer, Fire, Jupiter",
"10. Makara (Capricorn) - Goat, Earth, Saturn",
"11. Kumbha (Aquarius) - Water Bearer, Air, Saturn",
"12. Meena (Pisces) - Fish, Water, Jupiter"
],
"links_and_sources": [
"General Kundalini resources from yogic texts (e.g., Yoga Upanishads, Hatha Yoga Pradipika)",
"Vedic Astrology references for Nakshatras and Rashis",
"Hindu Calendar alignment with festivals (e.g., Navratri in Ashwin, etc.)"
]
}
}
QUESTION_TEMPLATES = [
"Who is {}?",
"What is {}?",
"Tell me about {}.",
"Explain {}.",
"Describe {}.",
"Give an overview of {}.",
"Can you introduce {}?",
"What do you know about {}?",
]
DETAIL_REQUESTS = [
"What are the main interests of {}?",
"Summarize {}.",
"Provide a detailed explanation of {}.",
"List the key focus areas of {}.",
]
FOLLOW_UPS = [
(
"Tell me about {}.",
"Can you summarize it in a few sentences?",
),
(
"What is {}?",
"What are its main focus areas?",
),
]
def example(messages):
return {
"messages": [{"role": "system", "content": SYSTEM_PROMPT}] + messages
}
dataset = []
for _, info in KNOWLEDGE.items():
aliases = info["aliases"]
summary = info["summary"]
facts = info["facts"]
bullet_answer = (
summary
+ "\n\nKey points:\n- "
+ "\n- ".join(facts)
)
# Summary-style questions
for alias, template in product(aliases, QUESTION_TEMPLATES):
dataset.append(
example(
[
{
"role": "user",
"content": template.format(alias),
},
{
"role": "assistant",
"content": summary,
},
]
)
)
# Detailed questions
for alias, template in product(aliases, DETAIL_REQUESTS):
dataset.append(
example(
[
{
"role": "user",
"content": template.format(alias),
},
{
"role": "assistant",
"content": bullet_answer,
},
]
)
)
# Multi-turn conversations
for alias, (q1, q2) in product(aliases, FOLLOW_UPS):
dataset.append(
example(
[
{
"role": "user",
"content": q1.format(alias),
},
{
"role": "assistant",
"content": summary,
},
{
"role": "user",
"content": q2,
},
{
"role": "assistant",
"content": bullet_answer,
},
]
)
)
# Fact-specific questions
for alias in aliases:
for fact in facts:
dataset.append(
example(
[
{
"role": "user",
"content": f"What is one important fact about {alias}?",
},
{
"role": "assistant",
"content": fact,
},
]
)
)
# Remove duplicates
seen = set()
unique_dataset = []
for item in dataset:
key = json.dumps(item, sort_keys=True)
if key not in seen:
seen.add(key)
unique_dataset.append(item)
with open("train.jsonl", "w", encoding="utf-8") as f:
for item in unique_dataset:
f.write(json.dumps(item, ensure_ascii=False) + "\n")
print("=" * 60)
print(f"Generated {len(unique_dataset)} training examples.")
print("Saved as train.jsonl")
print("=" * 60)